Exercise - Create recurring flows
In this unit, you'll learn how to build prescheduled flows by using a trigger called recurrence. Contoso has an annual event and they receive phone calls inquiring on the details. The Contoso team answering the phone calls places the contact information in a Microsoft Excel workbook on Microsoft OneDrive. You'll build a flow for the Contoso event team that automatically pulls customer email addresses from a Microsoft Excel workbook on Microsoft OneDrive. You'll then set up the flow so that any email addresses that anyone adds to the workbook will receive an event information email once a day.
Prerequisites
For this scenario, you’ll need to make an Excel file with a table that contains the following columns: ContactEmail, FirstName, and LastName. Save the Excel file in OneDrive for Business. You'll connect to this file in step 9. Use your organization email address as the ContactEmail, using your email will make testing the flow easier.
Note
Be sure to format your Excel data as a table. This is the table referenced in step 11.
Here’s what the Excel table looks like:
Create a scheduled flow
Sign in to Power Automate by using your organizational account.
Select the correct environment.
Select My flows.
Select New, and then select Scheduled cloud flow.
By default you have the option to repeat every 1 minute, however, you have the option to change it and the options available are Minute, Week, Day, Hour and Second.
Note
Be mindful of the repeating module you select and how often you would like the flows to run.
Name your flow and under Run this flow set the flow to repeat every one Day.
Select Create.
Select the Insert a new step button and then select Add an action.
In the search field, enter excel, select the Excel Online (Business) List rows present in a table action.
Select Sign in and sign in with your organization credentials, if prompted.
In the Location field, select the drop-down arrow and select OneDrive for Business.
In the Document Library field, select the drop-down arrow and select OneDrive.
In the File name field, select the folder button, and then select the Excel file to use.
In the Table name box, select the drop-down arrow, and then browse to and select the worksheet to use.
Select the Insert a new step button and then select Add an action.
Search for Office 365 send and email and select Office 365 Send an email (V2).
Select the To field and then select Enter custom value.
Type / and then select Insert Dynamic Content.
Select Contact Email.
Your Send an email action will automatically be added inside a For each. This occurred because multiple emails need to be sent.
Enter Contoso Event Information for Subject.
Type Dear in the Body and then type /, and select the Insert Dynamic Content button.
Select First Name from the dynamic content pane.
Press ENTER and then type Thank you for your interest in Contoso's annual event. As information becomes available, you'll be the first to know!
The Send an email step should now look like the image below.
Select Save and wait for the flow to be saved.
Your cloud flow should now look like the image below. Select Test.
Select Manually and then select the Test button.
Select Run flow.
Select Done.
The flow should run successfully.
You should receive and email like to one below.
And there you have it!
This flow will now run once a day. It will:
Get the new rows from the Excel worksheet
Grab the email address and name from each row
Enter the email address and name in the email step, and send them an event information email
Save you from manually composing emails to each interested caller.