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 arrives with a specific subject line and email address, the flow takes 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 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 the + (plus) button below the trigger to open the Add an action panel.
Search for Create file, and then select the Create file action under the SharePoint connector.
For Folder Path select /Shared Documents
Select in the File Name field and type / to open the dynamic data picker.
Select Attachments Name from the dynamic data picker.
Select in the File Content field and then type / to open the dynamic data picker.
Select Attachments Content from the dynamic data picker. 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 creates 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.