Managers often ask for various kinds of periodical reports, and it is of course convenient to let a flow generate them.
In the demo below, Peter Kalmström, CEO and Systems Designer of kalmstrom.com Business Solutions, shows how to create a flow that generates a monthly e-mail with information about total number of projects and total approved budget.
Peter uses two kinds of variables in this flow,,Initialize variable? and,Increment variable?. The,Increment variable? actions adds to the Initialize variables and count the number of projects and the sum of the approved budgets in an,Apply to each? action.
When you create flows that send e-mails, it is a good idea to put yourself as the receiver first, so that you can test the flow without disturbing other people. When the flow runs as it should, you can edit the flow and change the receiver of the e-mail.
Steps to create a flow that sends a monthly projects report
At https://flow.microsoft.com/, go into 'My Flows' and click on 'Create from blank'.
Select the trigger 'Schedule, Recurrence'. Set the frequency to 1 month.
Click on 'New step' and then search for the action ?Variables, Initialize variable?.
Set the,Name? to,TotalNumberOfProjects??? and the ?Type? to,Integer?. Leave the,Value? field blank, as this value will be calculated by an,Increment variable? action.
Add the action,Variables, Initialize variable?. Set the,Name? to,TotalApprovedBudget??? and the,Type? to,Float?. Leave the,Value? field blank, as this value will be calculated by an Increment variable.
Add the action,SharePoint, Get items? and select the Projects list site and the Projects list.
Add the action,Apply to each? and set the output to the dynamic content,value?.
Add the action,Variables, Increment variable? for the,Apply to each?. At,Name? select the variable ?TotalNumberOfProjects???. Set the,Value? to,1???.
Add the action,Variables, Increment variable? for the,Apply to each?. At,Name? select the variable "TotalApprovedBudget???. b. Set the,Value? to the dynamic content,Approved Budget?.
Add the action,Office 365 Outlook, Send an email? and fill out the receiver e-mail address and the subject. For the body, write some explaining text and add the dynamic contents,TotalNumberOfProjects? and,TotalApprovedBudget?.
Save the flow.
Recurrence flows run when you save them, so you just have to make sure that the message is sent to the right person and contains the correct information.