Automatically Move Email Attachments to SharePoint
Step by step: set up the Outlook trigger, attachment filter, and SharePoint upload with Power Automate, including folder structure and naming.
Automatically moving email attachments to SharePoint can be implemented in Power Automate with a fixed basic setup: the Outlook trigger “When a new email arrives (V3)”, a filter for existing attachments, and the SharePoint action “Create file”. As soon as an email with an attachment arrives in the selected mailbox, the flow takes over the attachments and places them directly in a SharePoint document library, without anyone having to manually download and re-upload the file. For small and medium-sized businesses, this flow is one of the most common entry points into Power Automate, because it reliably replaces a recurring manual task such as filing invoices or delivery notes from the inbox. As of: July 2026.
Step 1: Set up the Outlook trigger for new emails with attachments
The trigger “When a new email arrives (V3)” from the Office 365 Outlook connector serves as the trigger. It starts the flow as soon as a new message arrives in the monitored mailbox, and can be restricted using several properties.
- Folder: determines which mailbox folder is monitored, for example the inbox or a subfolder populated by a rule.
- From: restricts the trigger to emails from a specific sender, for example a fixed supplier.
- Has Attachment: only triggers the flow for emails with an attachment and prevents unnecessary runs without files.
- Subject Filter: checks the subject for specific terms, for example “invoice” or an order number.
Also important is the advanced option that not only detects the attachments but also delivers their content. If this option remains disabled, the trigger provides the information that an attachment exists, but no file content, which causes the later SharePoint action to fail with empty content.
Step 2: Filter attachments before processing
An email can contain several attachments at once. For each file to land individually, the flow needs a loop over the list of attachments from the trigger. Within this loop, you can additionally filter, for example by file type, so that only PDF or image files are processed further and embedded signature images or company logos are filtered out. Anyone who only wants to automate specific senders or subject lines combines the trigger filters from step 1 with an additional condition before the upload. This keeps the target library clean and prevents every promotional email with an attachment from unnecessarily consuming storage space and flow runs.
Step 3: Automatically save the attachment to SharePoint
The action “Create file” from the SharePoint connector is used for the actual upload. It uploads a file to an existing document library and essentially requires three pieces of information for this:
- Site Address: the SharePoint site where the target library is located.
- Folder Path: the library or the subfolder in which the file is stored.
- File Name and File Content: from the dynamic values of the attachment, i.e. attachment name and attachment content from the Outlook trigger.
These three fields are already sufficient for the basic case. The flow then runs automatically for every matching email: trigger the flow, loop through attachments, create file.
Step 4: Keep the folder structure and naming clean
Without further adjustment, all files end up in the same target folder, and two attachments with an identical file name overwrite each other or create conflicts. In practice, it is therefore worthwhile to build the folder path dynamically from a field such as sender or received date, for example a subfolder per month. For the file name, an addition of date or time before the actual attachment name helps, so that two files named “invoice.pdf” do not claim the same spot. This standard setup does not perform an automatic content check to see whether an invoice already exists, that requires additional logic, for example a comparison using “Get files” before creation.
Anyone who does not want to configure this setup themselves, or additionally wants to clarify which Power Automate license is required for the target mailbox and SharePoint usage, can find support in the Power Automate consulting from NordFlux.
Frequently asked questions about automatically moving email attachments to SharePoint
Does the flow also work with a shared mailbox?
Yes, the Office 365 Outlook connector supports shared mailboxes. The connected account needs full access to the shared mailbox, and the permission must have been actively used once before the first flow run, so that Exchange provisions the default folders for this mailbox.
What happens if an email has several attachments?
All attachments are available in the trigger as a list. The flow must loop through them individually and call the SharePoint action “Create file” for each attachment, otherwise only the first attachment is transferred.
Are emails without an attachment also processed?
Only if the trigger property “Has Attachment” remains disabled. In practice, activating this filter is almost always worthwhile, because it avoids unnecessary flow runs without a file.
How do I avoid files with the same name being overwritten?
Through dynamic naming, for example date and time before the original file name. A pure content-based duplicate check is not included in the standard setup and would have to be added separately.
Sources: Microsoft Learn – Trigger a cloud flow based on email properties, Microsoft Learn – Trigger approvals from a SharePoint document library, Microsoft Learn – SharePoint connector for Power Automate
NordFlux UG (haftungsbeschränkt)
NordFlux builds digital employees for organisations: automations and AI agents that take over repetitive work. You stay in control.
Concrete questions about automation or AI?
In a free initial analysis we discuss your case directly. No strings attached.