HomeIndustry AutomationHow to Automatically Save Outlook Email Attachments to SharePoint

How to Automatically Save Outlook Email Attachments to SharePoint

Downloading email attachments manually and uploading them to SharePoint can waste time, especially when employees receive dozens of invoices, purchase orders, customer documents, or project files every day.

A better approach is to automate the process using Microsoft Power Automate.

With an automated cloud flow, you can monitor incoming Outlook messages, detect emails containing attachments, and save their files directly into a selected SharePoint document library.

For example, imagine that your accounting department receives supplier invoices by email. Instead of downloading every PDF and uploading it manually, Power Automate can automatically store the attachments in a shared SharePoint folder.

In this guide, you’ll learn how to build this workflow step by step, filter incoming emails, handle multiple attachments, prevent filename conflicts, and troubleshoot common errors.

Quick Answer: How to Save Outlook Email Attachments to SharePoint Automatically

You can automate this process using an Outlook trigger and a SharePoint file creation action.

The basic Power Automate workflow looks like this:

Outlook Email Received → Check Attachments → Get Attachment Content → Create File in SharePoint

The main components are:

Component Purpose
When a new email arrives (V3) Detects incoming Outlook messages
Only with Attachments Processes messages containing files
Apply to each Processes multiple attachments individually
Get Attachment (V2) Retrieves the actual attachment content
SharePoint – Create file Saves each attachment to a document library

Using a separate attachment retrieval action is useful for larger workflows because Microsoft documents possible trigger timeouts when attachment content is downloaded directly by the Outlook trigger.

What You Need Before Creating the Workflow

Before building the automation, make sure you have the following:

  • A Microsoft 365 account with access to Power Automate.
  • An Outlook mailbox connected to the Office 365 Outlook connector.
  • A SharePoint site where you can upload files.
  • Permission to create files in the destination document library.
  • An existing folder for storing incoming attachments.

For this tutorial, we’ll use the following example:

Setting Example
Email service Outlook
Automation platform Power Automate
Destination SharePoint
Document library Documents
Destination folder Email Attachments
File type PDF, Excel, Word
Trigger New incoming email with attachments

You can adapt the workflow to save invoices, customer documents, purchase orders, reports, or other business attachments.

Step 1: Create a Destination Folder in SharePoint

First, prepare the SharePoint location where Power Automate will save incoming files.

  1. Open your Microsoft 365 SharePoint site.
  2. Navigate to the Documents document library.
  3. Select New.
  4. Choose Folder.
  5. Enter the folder name:

Email Attachments

  1. Select Create.

Your destination structure should look similar to this:

SharePoint Site
└── Documents
    └── Email Attachments

You can also create separate folders for different departments or document types.

For example:

Documents
├── Invoices
├── Purchase Orders
├── Customer Documents
└── Project Reports

This makes it easier to organize files as your automation grows.

Important: Make sure the account used by Power Automate has permission to upload files to the selected document library.

Step 2: Create an Automated Cloud Flow

Now create the automation that monitors your Outlook inbox.

  1. Open Microsoft Power Automate.
  2. Sign in with your Microsoft 365 account.
  3. Select My flows.
  4. Select New flow.
  5. Choose Automated cloud flow.
  6. Enter a name:

Save Outlook Attachments to SharePoint

  1. Search for the Outlook trigger:

When a new email arrives (V3)

  1. Select the Office 365 Outlook connector.
  2. Select Create.

Power Automate now opens the flow designer with the Outlook trigger.

This trigger starts the workflow when a new email arrives and matches the configured criteria.

You can also filter incoming messages by sender, subject, recipient, importance, or mailbox folder.

For more information, see Microsoft’s official guide: Trigger a cloud flow based on email properties.

Step 3: Configure the Outlook Email Trigger

The trigger configuration determines which incoming messages the automation should process.

Open the When a new email arrives (V3) action.

Configure the following options:

Setting Recommended value
Folder Inbox
Only with Attachments Yes
Include Attachments No
Importance Any
From Optional
Subject Filter Optional

Why Set Only With Attachments to Yes?

This option prevents the flow from processing messages that don’t contain attachments.

For example, if your inbox receives 100 emails but only 20 contain documents, the automation can focus on those 20 messages.

Why Set Include Attachments to No?

This is an important configuration detail.

Microsoft documents that setting Include Attachments to Yes makes the trigger wait for attachment content to be downloaded.

When many messages with attachments arrive around the same time, this can contribute to trigger timeouts.

A more reliable design for this tutorial is:

  1. Set Include Attachments to No.
  2. Retrieve each attachment separately using Get Attachment (V2).
  3. Pass its content to the SharePoint Create file action.

The attachment metadata remains available for identifying the files.

Filter Emails by Sender or Subject

You can make the workflow more specific.

For example, suppose you only want to save invoices received from a supplier.

Use the From field to specify the supplier’s email address.

You can also use Subject Filter with a term such as:

Invoice

This reduces unnecessary flow executions.

However, only use filters that match your actual email organization. Some suppliers may use different sender addresses or subject formats.

Step 4: Add an Apply to Each Action

An email can contain one attachment or several attachments.

Power Automate needs to process each attachment individually.

To do this:

  1. Select New step.
  2. Search for Apply to each.
  3. Select the Control action.
  4. In Select an output from previous steps, choose the Attachments array from the Outlook trigger.

The workflow now creates a loop.

For example, if an incoming message contains three attachments:

Email Received
    |
    v
Apply to each attachment
    |
    +---- Invoice.pdf
    |
    +---- PurchaseOrder.xlsx
    |
    +---- DeliveryNote.docx

The actions placed inside this loop will run for each attachment.

Important: Select the Attachments collection from the trigger, not the message body or subject.

Step 5: Retrieve the Attachment Content

The Outlook trigger can provide attachment information, but with Include Attachments set to No, you need another action to retrieve the actual file content.

Inside Apply to each:

  1. Select Add an action.
  2. Search for Office 365 Outlook.
  3. Select Get Attachment (V2).
  4. Configure the fields.

Use these values:

Field Value
Message Id Message Id from the Outlook trigger
Attachment Id Attachment Id from the current attachment

Power Automate uses these identifiers to retrieve the correct attachment from the original email.

The action returns information about the attachment, including its content.

This is important because SharePoint’s Create file action needs both the filename and the actual file content.

Step 6: Add the SharePoint Create File Action

Now connect the Outlook attachment to SharePoint.

Inside the Apply to each loop, after Get Attachment (V2):

  1. Select Add an action.
  2. Search for SharePoint.
  3. Select Create file.
  4. Configure the destination.

Use the following settings:

Field Value
Site Address Your SharePoint site
Folder Path Documents/Email Attachments
File Name Name from the current attachment
File Content ContentBytes from Get Attachment (V2)

The exact dynamic content labels may vary slightly depending on the connector interface.

Understanding the Create File Fields

Site Address

Select the SharePoint site where the files should be saved.

Folder Path

Choose the destination folder created earlier.

File Name

Use the attachment’s original filename.

For example:

Supplier-Invoice-1045.pdf

File Content

Select the attachment content returned by Get Attachment (V2).

Do not select the email body or attachment metadata.

The Create file action uploads the actual file to the selected SharePoint document library.

Microsoft documents the available operations in its SharePoint connector for Power Automate.

Step 7: Save and Test the Automation

After configuring the actions, save your flow.

Now test it using a new email with a sample attachment.

Test Procedure

  1. Select Save.
  2. Open the flow’s Test option.
  3. Choose the manual testing option where available.
  4. Send a new email to the monitored Outlook inbox.
  5. Attach a small PDF document.
  6. Wait for the flow to execute.
  7. Open the Power Automate run history.
  8. Check whether all actions completed successfully.
  9. Open the SharePoint destination folder.
  10. Confirm that the PDF was uploaded.

You should now see the attachment in:

SharePoint → Documents → Email Attachments

Open the file to verify that its content is correct.

Test Multiple Attachments

Send a second email containing:

  • One PDF file.
  • One Excel workbook.
  • One Word document.

The Apply to each action should process all eligible attachments individually.

Verify that all three files appear in SharePoint and can be opened.

Step 8: Prevent Duplicate Filename Errors

One common problem occurs when two emails contain attachments with the same filename.

For example:

Email 1: Invoice.pdf
Email 2: Invoice.pdf

If both files are uploaded into the same SharePoint folder, the second Create file action may fail because a file with that name already exists.

Solution 1: Use Separate Folders

Create folders for different months or suppliers.

For example:

Email Attachments
├── January
├── February
├── March
└── April

This reduces collisions between files.

Solution 2: Add a Timestamp to the Filename

You can create a unique filename by adding the date and time to the original attachment name.

For example:

20261204-174500-Invoice.pdf

One possible Power Automate expression is:

concat(
  formatDateTime(utcNow(),'yyyyMMdd-HHmmss-fff'),
  '-',
  items('Apply_to_each')?['name']
)

If your loop has a different internal name, replace Apply_to_each with the actual loop name.

This approach helps prevent files from overwriting or conflicting with other attachments that have the same original name.

Solution 3: Use SharePoint Metadata

For larger workflows, consider adding metadata columns such as:

  • Original Email Subject
  • Sender
  • Received Date
  • Document Category
  • Processing Status

This helps employees identify where each document came from without relying entirely on its filename.

Step 9: Filter Attachments by File Type

You might not want to save every file received through Outlook.

For example, your accounting department may only need PDF invoices and Excel reports.

You can add a Condition inside Apply to each.

Use the current attachment’s name to evaluate its extension.

Conceptually:

endsWith(toLower(Name), '.pdf')

For PDF and Excel files, you can use an OR condition:

or(
  endsWith(toLower(Name), '.pdf'),
  endsWith(toLower(Name), '.xlsx')
)

Make sure the expression references the attachment Name property available in your current loop.

Place the Get Attachment (V2) and Create file actions inside the condition’s Yes branch.

This means Power Automate only retrieves and saves the attachment when its filename matches your approved file types.

Why Filter Attachments?

Filtering helps you:

  • Avoid storing unnecessary images or signature files.
  • Keep SharePoint folders organized.
  • Reduce unnecessary storage usage.
  • Ensure departments receive the documents they actually need.

For workflows that should exclude inline email images, inspect the attachment’s inline metadata and add an appropriate condition where that property is available.

Step 10: Organize Attachments by Sender or Email Subject

A single SharePoint folder can become difficult to manage when hundreds of files arrive every week.

A better solution is to organize attachments automatically.

For example:

Documents
└── Email Attachments
    ├── Supplier A
    ├── Supplier B
    ├── Supplier C
    └── General Documents

You can use conditions based on the sender’s email address or message subject.

Example: Route Supplier Invoices

Suppose Supplier A sends invoices from a known business email address.

Configure a condition that checks the sender.

If the sender matches Supplier A, save the file in the Supplier A folder.

If the sender matches Supplier B, use the Supplier B folder.

This creates a more structured document management workflow.

Example: Organize by Document Type

You can also use subject filters or attachment filename rules:

Condition Destination
Subject contains Invoice Invoices
Subject contains Purchase Order Purchase Orders
Subject contains Report Reports
No matching rule General Documents

For sensitive business records, remember that the folder destination should follow your organization’s permission and retention policies.

Troubleshooting: Outlook Attachments Not Saving to SharePoint

Even after creating the workflow, some attachments may fail to upload.

The following checks will help identify common problems.

Problem 1: The Flow Doesn’t Start When an Email Arrives

Check the Outlook trigger configuration.

Verify that:

  • The flow is turned on.
  • The correct mailbox is connected.
  • The monitored folder is correct.
  • The sender and subject filters are not too restrictive.
  • Only with Attachments is configured as intended.

If there are no runs in history, investigate the trigger before changing the SharePoint action.

For more help, see our guide: Power Automate Flow Not Triggering? 11 Fixes.

Problem 2: Attachments Are Missing From the Flow

Make sure the Outlook trigger is returning the attachment metadata.

Check the Attachments collection in the run history.

If you configured Include Attachments as No, use Get Attachment (V2) to retrieve the file content.

Also verify that the current Apply to each loop is processing the attachment collection from the correct email.

Problem 3: The Create File Action Returns an Error

This problem can be related to SharePoint configuration.

Check the following:

  • The SharePoint connection is authenticated.
  • The selected site address is correct.
  • The destination document library exists.
  • The folder path is correct.
  • The connected account can upload files.
  • The filename doesn’t conflict with an existing file.

If the destination folder was deleted or renamed, update the Create file action.

Problem 4: The Flow Saves Only One Attachment

Check the Apply to each action.

The loop must use the Attachments array, not a single filename or file content value.

Place Get Attachment (V2) and Create file inside the loop.

This ensures that each attachment is retrieved and saved separately.

Problem 5: The Workflow Times Out

One possible cause is downloading attachment content directly in the Outlook trigger when many messages arrive simultaneously.

Microsoft documents this limitation and recommends setting Include Attachments to No and retrieving each attachment separately using Get Attachment (V2).

Also review the size of the messages and the platform’s applicable limits.

Problem 6: Some Emails Are Never Processed

The Office 365 Outlook connector documents that the When a new email arrives (V3) trigger can skip messages whose total size exceeds the lower of the Exchange administrator’s limit or 50 MB.

It may also skip protected emails and messages with invalid bodies or attachments.

Check the original message and the connector’s run history before assuming the flow is incorrectly configured.

Problem 7: The Trigger Runs Twice but the First Run Has No Attachments

Microsoft documents a potential issue involving Safe Attachments with Dynamic Delivery in Microsoft Defender for Office 365.

In this situation, the trigger can run twice, and the first run may contain an empty attachments array.

A useful safeguard is to check that the attachment array contains at least one item before continuing with file processing.

This prevents the flow from attempting to save an attachment that hasn’t been returned yet.

Best Practices for Outlook-to-SharePoint Automation

For a business-critical workflow, a few additional practices can improve reliability and security.

Use a Dedicated Destination Library

Avoid storing every department’s documents in the same unrestricted folder.

Separate files according to business requirements and access permissions.

Limit Which Emails Are Processed

Use sender, subject, folder, or recipient filters to avoid processing irrelevant messages.

Handle Duplicate Files

Use unique filenames, appropriate folder structures, or an explicit duplicate-handling process.

Monitor Failed Runs

Review the flow’s run history regularly.

For important business workflows, consider an error notification and a documented recovery procedure.

Protect Sensitive Attachments

Invoices, employee records, contracts, and customer documents may contain confidential information.

Use approved SharePoint permissions and retention policies.

Avoid creating public or anonymous sharing links just to make a workflow function.

Keep a Record of the Original Email

Where required, save useful metadata such as the sender, email subject, and received date alongside the uploaded documents.

This makes it easier to trace a file back to its source.

Frequently Asked Questions

Can Power Automate automatically save Outlook attachments to SharePoint?

Yes. Use the When a new email arrives (V3) trigger, retrieve each attachment with Get Attachment (V2), and save it through SharePoint’s Create file action.

Can I save multiple Outlook attachments automatically?

Yes. Use Apply to each with the Attachments collection from the Outlook trigger.

Each attachment can then be retrieved and uploaded individually.

Can Power Automate save only PDF attachments?

Yes. Add a Condition that checks whether the attachment filename ends with .pdf.

Place the SharePoint upload actions inside the matching branch.

Can I save Outlook attachments to a specific SharePoint folder?

Yes. Configure the Folder Path field in SharePoint’s Create file action.

The selected folder must exist and be accessible to the connected account.

Does Power Automate work with shared Outlook mailboxes?

Yes, using the appropriate shared mailbox trigger and permissions.

The connected account must have the required access to the shared mailbox.

Why are Outlook attachments not appearing in SharePoint?

Possible causes include an incorrect folder path, missing attachment content, invalid SharePoint permissions, duplicate filenames, or an unsuccessful Outlook trigger.

Inspect the run history to locate the first failed action.

Can I filter emails by sender before saving attachments?

Yes. Use the From field in the Outlook trigger to monitor messages from specific senders.

You can also apply subject filters.

Will the automation save email images and signatures?

The attachment collection may include inline content depending on the message and connector output.

If you only want document attachments, inspect the available inline attachment metadata and filter those items out where appropriate.

What happens if two emails contain the same attachment filename?

The SharePoint Create file action may fail when a file with the same name already exists.

Use a timestamp, a unique identifier, or a structured folder path to prevent collisions.

Can I organize uploaded attachments by month?

Yes. You can use the email’s received date to determine the destination folder.

For example:

Email Attachments
└── 2026
    ├── January
    ├── February
    ├── March
    └── December

Make sure the target folders exist or add a folder-creation step before uploading the files.

Final Thoughts

Automatically saving Outlook email attachments to SharePoint can reduce repetitive administrative work and make business documents easier to organize.

Power Automate provides the essential components: an Outlook email trigger, an attachment-processing loop, an attachment retrieval action, and SharePoint’s Create file operation.

Start with a simple workflow that monitors one inbox folder and saves permitted attachments to a dedicated SharePoint document library.

Once the basic process works, you can add sender filters, file type restrictions, unique filenames, metadata, and department-specific folders.

Most importantly, test the automation with sample emails, verify every uploaded file, and make sure that document permissions protect your organization’s information.

A well-designed workflow turns incoming email attachments into an organized document management process without requiring employees to download and upload every file manually.

For more practical guides on Microsoft 365 and business workflow automation, explore IA Network.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments