Editorial photo on Microsoft Power Apps theme. Illustrative photo for news about The Microsoft Power Apps - a low-code development platform for building custom applications
Image: photo_gonzo/Adobe Stock

My article How to use Windows 10 Task Scheduler to run Office 365 tasks shows you how to schedule a recurring Office task using Windows Task Schedule. It’s a bit involved and requires knowledge of VB Script.

Now, thanks to Microsoft Power Automate, you can create a flow to keep up with your recurring tasks. They are quicker and easier to implement than a scheduled task that requires VB Script. In fact, you won’t need any code, because the flow creates the code internally for you. In this tutorial, I’ll show you how to use Power Automate to create a flow that sends an email with an attached Microsoft Excel workbook everyday at the same time.

SEE: Windows, Linux, and Mac commands everyone needs to know (free PDF) (TechRepublic)

You’ll need Microsoft 365, which now includes Power Automate and OneDrive for Business. Although Microsoft Power Automate Desktop is free to Windows 10 users it comes with some restrictions:

  • You can access flows only from your desktop.
  • You can’t collaborate on desktop flows.
  • You can’t combine desktop flows with cloud flows.
  • You can’t use AI builder.
  • You can’t schedule flows.

That last one means you need Microsoft 365 to access Power Automate’s scheduling options.

How to prepare for the schedule flow

Before you do anything, think through the process you want to automate. For this example, let’s suppose the boss wants to see the same Microsoft Excel sales report every afternoon. Instead of worrying about scheduling, unexpected sick days and so on, you can create a flow using Power Automate that will send that report to your boss every day.

You’ll need a Microsoft Excel file and a flow — that’s it. For the dummy Excel file, save a blank Excel .xlsx file to OneDrive for Business with the name Daily Sales Report for Boss.xlsx. It’s blank because we don’t need data; we only need a dummy file to reference in the flow. When updating this technique for your files, be sure to adapt the name and location. You could use any Microsoft 365 file for this flow as long as it’s saved to OneDrive for Business.

Now let’s move on to the flow.

How to start a scheduled flow in Power Automate

Sign into Power Automate via OneDrive or your Microsoft account. Regardless of how you sign in, start a new flow and then choose Scheduled Cloud Flow in one of two ways, as shown in Figure A.

Figure A

Choose Scheduled Cloud Flow.

Refer to Figure B to complete the initial settings. Name the flow Daily Sales Report to Boss. The Starting setting defaults to the current day, which is fine. Yours won’t match mine. Choose the time, 3:45PM, from the time dropdown. Change the Repeat Every interval to Day. After setting these items, click Create. The resulting flow will run every day at 3:45PM.

Figure B

Set the start time and recurrence for the flow.

You can edit the flow at any time by clicking the Recurrence title bar. At the bottom of this edit window, click the Advanced Options link to set time zones and other advanced options shown in Figure C. Feel free to look around a bit, so you can see what’s available. We won’t complicate the example by setting anymore recurrence options.

Figure C

The advanced options offer more control for the schedule.

Click the Recurrence bar to close the scheduling options. Now that you’ve scheduled the flow, let’s add what it does.

How to send an email in Power Automate

To move on, click New Step, shown in Figure D. Choose Microsoft 365 Outlook to the right. If you don’t use Outlook, choose the appropriate mail app, such as Mail. Doing so will display a list of possible actions. Figure E shows a few Outlook actions. Choose the Send Email action.

Figure D

Click New Step to access apps and actions.

Figure E

Choose Send Email from the list of actions.

Use the settings in the resulting action window to denote who gets the email. In this case, enter your email. You don’t want to enter your boss’ email while you’re exploring. Use Figure F as a guide to set the three required options.

Figure F

Fill in the required settings.

Then, click Show Advanced Options near the bottom so you can identify the attachment — the blank Excel file you saved to OneDrive earlier. This flow doesn’t require any dynamic options because the email is going to the same person with the same attached file every day.

Using Figure G as a guide, enter the name of the file. Next, grab the link from OneDrive for the actual file — open OneDrive, browse to the appropriate folder and open the file. Copy the URL to the Attachments Contents field. In the Reply To control, enter your email.

Figure G

Identify the attachment by file name and location on OneDrive.

When all the settings are correct, click Save. Power Automate will prompt you to test the new flow. I recommend that you do so before putting the flow into production. If the test returns no errors, check your email account. Figure H shows the email with attachment in Mail.

Figure H

The flow will send you an email with the attached Microsoft Excel file.

If the flow returns an error, check the location link of the Excel file on OneDrive for Business. Also check the email accounts to make sure they are valid accounts within your organization.

Stay tuned

Setting up this flow takes only a few minutes. If the boss makes a request to change the frequency or time, you don’t have to create a new flow and delete the existing one. Simply edit the existing flow accordingly.

This flow doesn’t consider whether you’ve updated the Excel file — it’s up to you to do so. Fortunately, there’s a flow for that, and in a future article, I’ll show you how to send a daily reminder using a Power Automate flow.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays