28 December 2018

Monthly Project Reports with a SharePoint Flow

Microsoft Flow icon Managers often want to have monthly or weekly reports on various things, and if you are efficient you let a flow put together the report and send it. In a new article in the Tips section, I show how this can be done.

Flow that creates and send e-mail report
The flow I describe in the article and in the demo below, will generate an e-mail report with the total number of projects and the sum of the approved budgets for these projects. A 'Schedule - Recurrence' trigger will make sure that the flow sends an e-mail with this content on the same day every month.

Flow variables for calculation
A variable is like a container that holds different types of information, and you can use variables for storing, modifying and retrieving any kind of data. In my report generating flow, I first Initiate the variables (required in Flows), then I Increment them and finally I read the variable values into the e-mail body.
Microsoft flow generated e-mail

I initialize two variables, one for the number of projects in a SharePoint list and one for the total of the approved budgets. The values in these variables are calculated by two Increment variable actions. They are executed inside an 'Apply to each' action that loops through the project items.

E-mail with calculated figures
When the 'Apply to each' has looped through the list, and the values for the Initialize variables have been calculated, the flow sends an e-mail with the figures for number of projects and total budget. The values are added as dynamic content in the e-mail body.

The total budget sum in the e-mail has no thousand separator. I decided to not include a thousand separator in the demo, because it is, at least currently, very complicated to add. The report will still work and give a correct result that is sent punctually each month, so I hope the manager will be content without the separator! SharePoint Flows from Scratch cover

My new book, SharePoint Flows from Scratch, will be published very soon, and the cover is already finished. I will come back and tell you more about it as soon as the book has been published on Amazon.

By Peter Kalmström
CEO and Systems Designer Business Solutions