Utilizing Microsoft Flow to create summary emails for edison365ideas
One of the many advantages to edison365’s edison365ideas platform is that it is built on Microsoft’s Office 365 platform. This opens many opportunities to make use of other Microsoft products such as Flow and PowerApps. This article walks through building an example weekly email summary for edison365ideas data using Microsoft Flow.
This example will email a list of edison365ideas that are in the “Under Review” stage but this could easily be updated to email of ideas data if required.
Process to create a Flow based email summary
Firstly, log in to office.com and access Flow or navigate straight to https://flow.microsoft.com
Click “My Flows” from the left navigation menu then New > Create from blank:
Click Create from blank:
This will load the new blank Flow canvas:
Click the Untitled text and name the Flow, for example, “Weekly edison365ideas Summary”. Then type recurrence in the input box:
Now click the Recurrence trigger then set the Frequency to Week:
At this point you can click More to specify other options such as Start time but that is not required. This will control what triggers the Flow to run. Click the + New step button and type SharePoint as we now need a SharePoint Action:
In the list of actions, select Send an HTTP request to SharePoint:
Using the menu, click Rename:
Rename that action to something more meaningful such as “Get UnderReview ideas”.
Next, complete the required properties for the action as per below:
Site Address: The SharePoint Online Site Collection URL where edison365ideas is deployed
/_api/web/lists/GetByTitle('Ideas')/Items?$Select=Title,edisonShortLink&$Filter=edisonIdeaStage/Title eq 'Under Review'
Headers: Key: Accept Value: application/json; odata=nometadata
This can be seen below:
This action will get a list of edison365ideas that are in the “Under Review” stage, if the requirement was for a different set of ideas, update the Uri property to return the correct list of edison365ideas.
This is just a standard SharePoint list REST API query, details can be found here: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service
Click the + New step button and type select as we now need a Select Action:
Click Select from the list of Actions. Click the From property and a panel will appear on the right-hand side, click Expression then enter the following in the expression function input:
Click OK. Now click the T outlined in red below to switch the text mode:
In the Map property enter the following:
The select step is used to create the hyperlink from the data returned from SharePoint.
Click the + New step button and type join as we now need a Join Action:
Click Join from the list of Actions. Click the From property and a panel will appear on the right-hand side, click Output from the Select section to add the output value from the previous Select action:
Type the following in the Join with property, <br/> in the Join with property, this is used to put each idea on a new row:
Finally click + New step and type email as we now need a Send an email Action:
In the To property, enter the email address for the recipient then enter the email subject. Click the Show advanced options and set Is HTML to Yes:
Click Hide advanced options.
In the Body, type the email body such as:
Now click Output under the Join heading from the right-hand content window:
The Flow is now ready to be tested. Click Save to save the Flow. Now click the Test in the top right corner:
Then select the option for I’ll perform the trigger action and click Save & Test:
Then click Run Flow in the pop up that appears. The Flow should execute successfully:
The recipient should then receive an email containing a list of all edison365ideas that are under review with clickable hyperlinks to open the idea in edison365ideas: