In Power Automate you can set up a flow to monitor your inbox and automatically save attachments that have been emailed to you. This post will show you how to create this flow and have the attachments (excluding email signatures) saved to a SharePoint folder.

Screenshot of email with attachment and SharePoint document folder

Create a new automated cloud flow with the Outlook trigger- When a new email arrives (V3). When selecting the criteria for the trigger action, ensure you set Include Attachments to Yes and Only with Attachments to Yes.

Read here to see how to add multiple words to the Subject Filter.

Screenshot of Outlook When a new email arrives trigger in Power Automate

For the next step, add in an Apply to Each control. This is so that each attachment included in the email will be saved. Select Attachments dynamic content in the Apply to Each field.

Screenshot of Apply to each action in Power Automate

Email signatures also get recognised as email attachments. To avoid creating files for email signatures, you will need to set up a condition. Within the Apply to each control, select Add an action and add in a Condition. Set the Condition to Attachments Is Inline (dynamic content) is equal to false.

Screenshot of Condition step in Power Automate

Within the If yes branch, click Add an action. Add the SharePoint action Create File. Select the Site Address and Folder path for where you wish to save the attachments.

If you do not see your site address listed, click Enter custom value then paste in the URL for your SharePoint site, which will looks something like this:

To select the folder, click on the folder icon the the arrow next to Shared Documents. You should then see the folders in your SharePoint site listed.

Set the File Name field to Attachments Name dynamic content. Set the File Content field to Attachments Content dynamic content.

Screenshot of SharePoint Create file action in Power Automate

Save and test your flow. Test your flow by sending an email to yourself, ensuring the email meets the criteria set up in the trigger action. After it runs, check SharePoint and you should see the attachments have been uploaded. You may need to refresh the SharePoint page if you don’t see them immediately.

Screenshot of email with attachment and SharePoint document folder

2 thoughts on “Save email attachments to SharePoint with Power Automate

  1. Hi @rishona, if you set the “Attachment content type” filed in the content file, you get an empty file (you are getting the content x-type).
    You have to set the “Attachment content” field in order to have a file correctly created

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s