Automatically Save Email Attachments
With this Power Automate flow, you automatically save all attachments from incoming emails to a SharePoint document library. You create an automated flow with the Outlook trigger 'When a new email arrives', add a condition for emails with attachments, and save the attachments using the SharePoint action 'Create file'. This way, you no longer need to manually download files and documents are immediately stored in a structured way.
Goal: This flow automatically saves all attachments from incoming emails to a SharePoint document library. It saves time and ensures that files are well organized.
Goal: This flow automatically saves all attachments from incoming emails to a SharePoint document library. It saves time and ensures that files are well organized.
Benefit: By automatically saving attachments to SharePoint, important information is stored securely and in a structured way, without having to manually download and organize files.
1. Create a new flow
-
Choose “Create flow” and select “Automated flow”.
-
Give the flow a name, for example “Save email attachments to SharePoint”.
2. Select the trigger
-
Search for “When a new email arrives” and choose the Outlook connector.
-
Set the trigger for the desired folder, for example your Inbox.
3. Add a condition
-
Add a Condition to only process emails with attachments.
-
Set the condition to: Has attachment equals Yes.
4. Add the action to save the file
-
Click “New step” and search for “Create file” from SharePoint.
-
Select the SharePoint site and document library where you want to save the attachments.
-
Fill in the dynamic content for the file name and the file itself.
5. Save and test
Save the flow and test it by sending yourself an email with an attachment. Check whether the attachment is automatically saved in SharePoint.
Hopefully you have managed to automatically save a file when a new email arrives via Power Automate. In addition to this article, we have more articles in our knowledge base. Do you have questions? Feel free to contact us!
Our tip: Add an extra column in SharePoint to the flow where you store the name of the sender or the subject of the email. This way you can easily find attachments later without having to open the file. Use the dynamic content ‘From’ or ‘Subject’ from the Outlook trigger for this.
Frequently asked questions
How do I create a new flow in Power Automate?
Open Power Automate and click 'Create flow'. Choose 'Automated flow' and give the flow a clear name, for example 'Save email attachments to SharePoint'. An automated flow starts automatically as soon as a trigger is activated, in this case the receipt of a new email.
How do I set up the trigger for incoming emails?
In Power Automate, search for the action 'When a new email arrives' and choose the Outlook connector. Set the trigger for the desired folder, for example your Inbox. You can also configure the flow to only activate for emails from a specific address or with a specific subject.
How do I add a condition so that only emails with attachments are processed?
After the trigger, add a 'Condition' action. Set the condition to: 'Has attachment' equals 'Yes'. In the 'Yes' path, add the SharePoint action to save the attachment. Emails without attachments are skipped and do not cause unnecessary steps in the flow.
How do I automatically save attachments to SharePoint via Power Automate?
Add a 'Create file' action from the SharePoint connector. Select the SharePoint site and document library where you want to save the attachments. Use the dynamic content 'Attachment name' for the file name and 'Attachment content' for the file itself. Then test the flow by sending yourself an email with an attachment and verify that the file appears correctly in SharePoint.