Exercise - Monitor incoming emails
You can create a flow that automatically performs one or more actions after it's triggered by an event. For example, the flow can monitor your Outlook inbox and when an email with a specific subject line and email address arrives, the flow will take the attachment and save it to a SharePoint library.
Prerequisites
Microsoft Office 365
Specify the SharePoint site and library
You can use any SharePoint site of your choice and can also use an existing library.
In this scenario, we'll use the following SharePoint site and its default Documents library, which is available out-of-box.
Specify an event to start the flow
First, you must select the trigger (event) that starts the flow.
Sign in to Power Automate by using your organizational account.
Select My flows.
Select New flow, and then select Automated cloud flow.
Under Choose your flow's trigger, enter Outlook, select the When a new email arrives (V3) trigger and select Create.
Select the trigger and then select the Show all button.
Add the following:
From - 'your org email'
Include Attachments - 'Yes'
Subject Filter - 'Daily report'
Importance - 'Any'
Only with Attachments - 'Yes'
Folder - 'Inbox'
Specify an action
Select Insert a new step and select Add an action.
Search for Create file, and then select the SharePoint Create File action.
For Folder Path select /Shared Documents
Click in the File Name field, and select the lightning bolt to pull up the Dynamic Content.
Select Attachments Name from Dynamic Content.
Click in the File Content field and then select the lightning bolt to pull up the Dynamic Content.
Select Attachments Content from Dynamic Content. The result should look like the image below.
Once the Attachments Name is added, the Create file action is automatically added inside of an Apply to each action. This means that if there are multiple attachments with the email, the flow will create a file for each attachment.
You have successfully built a Power Automate flow, which will monitor your Outlook inbox for any emails that have the text Daily report in their Subject line and have Attachments.