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 with an approved budget and
the total sums of the approved budgets.
Peter uses two kinds of variable actions in this flow: Initialize
variable and Increment variable. The Increment variable
actions adds to the Initialize variable actions 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
Start with a Schedueld blank flow and set the frequency
to 1 month and the time when you want the flow to start.
In the trigger, set the time zone under advanced
options.
Add 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.
Set the Value to the dynamic content Approved Budget.
Add the action Office 365 Outlook, Send an email
(V2) 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 can be tested via the Test button
in the editor or via the Run command on the My flows
page. Both open the same right panel where you can run
the flow.