Document processing

Save Outlook attachments to SharePoint reliably

Reading time
13 minutes
Updated
Published
Written by
modernagents editorial teammodernagents is an AI automation agency from Austria for SMEs, based in the Vienna region.
AI-generated image: Desktop binding machine with an indigo lever grip on brushed aluminium

Perhaps it works like this for you: every morning, someone opens the invoice mailbox, downloads the PDF attachments and saves them to SharePoint by hand. It takes time, and now and then an invoice is missing or filed twice. You wonder whether this could not happen on its own.

Power Automate, Microsoft's automation tool, can save Outlook attachments to SharePoint automatically. For this to work in daily business, though, you need to settle more: where each file goes, what it is called, what happens when the same file arrives again, who may see it and what happens when something fails.

An example: a plumbing and heating supplies wholesaler in Bologna with 35 employees receives its supplier invoices in a shared mailbox. Today, Chiara from accounts saves the attachments by hand to a SharePoint library every morning. With the change, a flow, an automated workflow in Power Automate, should file the invoices and delivery notes itself, and Chiara should only need to look at the cases the flow cannot handle. This is about an invoice mailbox for which you have approved the automation, and about the order in which you build and accept the workflow. Check the precise settings in your own Microsoft 365 tenant, the Microsoft 365 environment of your business.

Key takeaways

  • First decide which mailbox or folder the flow reads and which library it saves to. Reviewing, posting and paying invoices are later business decisions.
  • The flow must fetch the actual file for each required attachment and establish whether that exact attachment has already been stored successfully.
  • Identical filenames and duplicate documents are two different things. Give each stored file a unique identifier and keep the original name as an extra property.
  • Check whether every expected attachment is stored or deliberately open, and actually open stored files.

01 / 13

What should the workflow do at the start?

First choose a mailbox or monitored folder and a SharePoint library for the flow to save to. The first flow should only store the required attachments reliably and record that they arrived. Whether an invoice is correct, is posted and is paid, you decide later and separately. This keeps technical acceptance manageable, and nobody mistakes the green tick after a successful upload for accounting approval of the invoice.

Establish whether the flow reads a personal or a shared mailbox, who looks after it and which file types arrive there. A shared mailbox, as at the wholesaler in Bologna, makes cover during absences easier. But the connection to the mailbox must not depend unnoticed on Chiara's personal account. If she leaves the business later and her account is removed, the flow should not quietly stop.

Also write down what the flow should not touch, for example personal correspondence, protected messages or compressed archives that it should not open automatically. Each such email needs a task that someone can see. "Not processed automatically" must not mean that nobody notices.

02 / 13

How do you prepare SharePoint before building the flow?

Create or select the document library the flow may save to, and check who can access it. Decide which extra details are stored with each file before the first flow writes any files. In SharePoint, these details are called metadata or properties. A deep folder structure can hide information, and a few stable locations with clear properties such as arrival date, intake number, origin and status can often help.

At the wholesaler in Bologna, the properties of a stored invoice could look like this:

Information Purpose Example
Intake number Stable link to the incoming email IN-2026-00418
Original filename Preserve provenance invoice.pdf
Stored filename Avoid identical names IN-2026-00418-01-invoice.pdf
Message reference Locate the source email Technical reference, not a free-text subject
Intake status Show unfinished work Stored; review open
Who looks after it Route the task Accounting or clarification queue

These names are a draft. SharePoint does not prescribe these fields, and they do not suit every archive either. Adapt them to the structure you already have. Do not put unnecessary personal details into filenames that many people can see.

03 / 13

How is the Outlook-to-SharePoint flow built step by step?

The flow from Outlook to SharePoint runs in eight steps, each of which you can check. At the wholesaler in Bologna, it looks like this:

  1. Trigger intake: the flow starts when a new email arrives in the agreed mailbox. It watches only the agreed scope of the mailbox.
  2. Record the intake: the flow saves a stable reference to the email and the state "received". It does not yet report that everything is stored.
  3. Identify attachments: the flow goes through the attachments of the email and decides by the agreed rules which ones it processes.
  4. Retrieve content: the flow fetches the actual file for each required attachment, not only its description such as name and size.
  5. Check repeat processing: the flow establishes whether this exact attachment has already been stored successfully.
  6. Create the file: the flow creates the file in the library, with a valid name and the actual file content.
  7. Add properties: the flow links the file to the email, the intake number and the status.
  8. Confirm the outcome: the flow saves the reference to the file in SharePoint and checks whether all expected attachments are stored or deliberately open.

This sequence is an implementation plan and does not describe a flow that has already run in your tenant. Check which actions are available to you, which permissions the connections have and what your licences cover before you turn it into a fixed project price or implementation estimate. What Microsoft recommends for large volumes of attachments is in the "For your IT team" section below.

04 / 13

Which attachments belong in the workflow?

A supplier's email can contain, next to the invoice, the company logo from the signature and images in the text. A filter that only looks for the word "invoice" in the filename is not enough. A genuine invoice can simply be called "scan.pdf", and a logo can also appear as an attachment. So let the flow check the technical details of each attachment together with your list of permitted file types. How exactly this works is in the "For your IT team" section.

Also check emails without a usable attachment. Suppose a supplier sends Chiara only a download link instead of a PDF. The flow should record this case, make it visible and not open arbitrary links on its own. Password-protected files also need an agreed route on which someone handles them by hand.

Do not rely on the file extension alone. A file that ends in ".pdf" may be damaged or contain something else. The filing step and the check afterwards need to detect that such a document cannot actually be opened.

05 / 13

How do filename collisions differ from duplicate documents?

On the same morning, two different suppliers each send a file called "invoice.pdf". The identical name must neither overwrite the first file nor cause the second to be discarded as a duplicate. That is why, in the example, each stored file gets a unique identifier such as IN-2026-00418-01, and the original name is kept as an extra property.

It can also be the other way round, when the same attachment arrives again or the flow starts twice for the same email. Then the flow should recognise that it has already processed this exact attachment from this exact email. If the same document arrives in two different emails, for example the same invoice, you need an additional check. That is something different from protecting against identical filenames.

Identical filenames, repeated processing and duplicate documents are three different problems:

Situation Response
Two suppliers each send "invoice.pdf" Use a unique stored identifier and retain the original name as metadata; neither overwrite the first file nor discard the second
The same attachment arrives again or the flow starts repeatedly Recognise an already processed combination of email and attachment
The same document, such as the same invoice, arrives in different emails Additional check, such as a hash followed by business identifiers (see "For your IT team")

This distinction must also show in the status Chiara sees. "Already stored from this email" is different from "possibly the same invoice, received another way". The second case may need a look from accounts, even when the files differ.

06 / 13

What happens when only part is stored?

In this example, a supplier sends the wholesaler in Bologna an email with three attachments: an invoice, a delivery note and the logo from its signature. The flow should file both documents and leave out the logo under the agreed rule. The invoice is saved, but during the delivery note the connection fails.

The intake then stays "partially complete". The log contains the reference to the stored invoice and an open task for the delivery note. A new run handles only the missing delivery note, without creating a second invoice and without reporting the deliberately excluded logo as a failure.

Once the new run has succeeded, Chiara opens both files and checks that they belong to the right email. The counts match: three attachments detected, two expected documents, two stored files and one logo deliberately left out. Only then does the intake get the status "completely stored".

For acceptance, this small case tells you more than a single email with one clean PDF. It shows whether status, new runs and exclusion rules work together. If you repeat the case, the library should still hold the same two documents, plus a traceable record of the repeat, but no additional files.

Got a workflow like this?

Tell me about it. Honest take and a rough price, usually within a day.

07 / 13

How do you verify contents, metadata and access?

Actually open stored files. An entry with a filename and a green success message do not prove that the content transferred correctly. Check file type, size, whether the file can be read and whether all pages are there.

Then test the way people will work later. Chiara from accounts must be able to open the invoice, while a colleague who should not see it, for example in the warehouse, must not see it. If you only test with a technical account that has very wide permissions, everything can look fine in the demonstration even though the library permissions are set up wrongly.

Decide which version you keep and how long the email needs to stay in the mailbox. Automatic filing does not by itself establish that every recordkeeping requirement is met. Your business must assess, across the whole workflow, how originals, changes, access and deletion are handled.

Also check whether the extra details stay with the file when an employee renames it or moves it to another folder. If the flow relies only on the storage location, ordinary tidying up in the library can break the link to the original email. What your IT team can do about this is in the "For your IT team" section.

08 / 13

Who keeps track in daily operation?

A regular reconciliation, on a schedule or by volume, should compare the incoming emails with the stored and the open attachments. Every failed run needs a person who looks after it and a reason for the failure that this person understands. The message "Flow failed" without a reference to the email gives Chiara little to work with.

Distinguish connection errors from business problems. If SharePoint is briefly unavailable, the flow can try again. Where a file is not permitted, the flow cannot process it or it is unclear where it belongs, a person needs to decide. Limit the number of retries, so the flow does not process the same unsuitable attachment again and again without end.

Write down who renews connections, who approves changes and who restarts the flow in a controlled way after an outage and checks that it works properly again. Test new rules with test emails first. Keep a description of the last approved settings and a route on which Chiara can file the documents by hand if needed.

This manual route also includes Chiara recording which files she filed by hand during the outage. Otherwise, the restarted flow may create another copy because it cannot see this work. When restarting, you therefore have to reconcile the automatic and the manual filing.

09 / 13

What happens when permissions or owners change?

In the approved test environment, temporarily remove the flow's permission to write to the library. The flow should still identify the email clearly, but not report the file as stored. When the permission is back, it continues with exactly the open attachment. This shows whether the status depends on the actual result or only on the flow having tried.

Also test someone else taking over the flow, for example because Chiara goes on parental leave. The new person must be able to see connection errors and open intakes. Necessary changes by the administrators should be documented, but passwords and credentials do not belong in the general instructions. And the former owner must not remain the only person who receives failure notifications.

Another test case concerns the filing location itself. When someone renames a folder or a library, the person who looks after the flow should know which connection is affected and how to check the path of the files again. Deliberately do not let the flow fall back to some other area that happens to be available. A file in the wrong place, or in a place too many people can see, is not a successful fallback for a failed save.

With these cases, you test changes that happen in daily operation even without a new AI model. That is exactly why they belong in the handover to operations, and you should run them again after relevant adjustments.

10 / 13

Which acceptance cases come before production?

For each of these acceptance cases, note which files you expect, where they go, which status the intake has afterwards and who looks after it:

  • one attachment
  • multiple attachments
  • identical filenames
  • repeated submission
  • inline image, an image inside the email text
  • protected file
  • missing permission
  • large document
  • interrupted upload
  • an arrival immediately before maintenance, with recovery checked afterwards

Do not let only the person who built the flow test it. Chiara and her colleagues, who will work with it later, should be able to correct a failed case and explain which attachments are already stored safely.

Finally, test the handover to operations. Another authorised person should be able to use the documentation to find the original email, check the outcome and continue the incomplete work. A flow where only its creator can find a fault remains fragile.

The finished flow delivers a complete intake that you can find, with exceptions you can see and trace. You can then build on it, for example with classification, meaning recognising the document type, with extraction of the details and with approval. As long as the filing itself creates unclear or duplicate cases, additional AI would only work on an unreliable foundation.

11 / 13

For your IT team

Microsoft documents, among other things, file creation and updating file properties in the SharePoint connector. A library file and a list item are different objects. Choose the action that matches the destination. Microsoft SharePoint connector, checked on 26 September 2026.

According to Microsoft, including all attachment contents directly in the Outlook trigger can cause timing problems at high volume. The vendor describes separate retrieval using "Get Attachment (V2)" instead. Office 365 Outlook connector. Follow the current guidance for your configuration and test with the expected peak volume.

Microsoft Graph represents attachments as separate objects with properties such as type, name, size and inline status. Combine these documented properties with your permitted file types. Microsoft Graph attachment reference. If the standard connector does not support a required attachment type, you need a separately verified path. Do not claim that a simple loop automatically covers every special case.

Detecting duplicate documents across different emails needs an additional check, such as a hash, a digital fingerprint of the file, followed by business identifiers. Keep this check separate from protection against identical filenames.

Test concurrency. Two simultaneous runs must not both choose a name that still looks free and then collide. The chosen design for storage and status must guarantee uniqueness or handle the conflict in a controlled way. Adding an arbitrary delay does not prove that the problem is solved.

During an acceptance test, also compare the original and the stored bytes where the flow does not deliberately convert the file. To keep the link to the original email, the source reference, use the supported identifiers appropriate to the chosen implementation, not only the path, and verify this behaviour explicitly after renaming and moving.

12 / 13

Take the worksheet

Worksheet

Download the editable CSV table

StepRuleException
ReadApproved mailbox and folderReport access failure
SelectCheck attachment type and contentExclude signature images
RouteApproved client mappingReview unknown assignments
StoreAvoid silent overwriteRecord collision
CompleteLink destination ID to sourceReconcile uncertain upload

Columns to fill in, in the file: Your value / observation, Owner, Next action.

Download the editable CSV table (CSV). Add your own values, owners and open actions. This worksheet contains no measured client results.

13 / 13

These guides and service pages cover the decisions next to saving Outlook attachments to SharePoint:

For a workflow review, start with the task, systems involved and typical exceptions. Discuss it with modernagents.

ShareEmail

Related reading

AI document processing

Got a workflow like this?

Tell me about it. Honest take and a rough price, usually within a day.

Robert Van Ysendyck · Founder & Managing Director