Power Automate: Get Attachments From a SharePoint List Item and Send by Email

If you’ve ever needed to pull file attachments out of a SharePoint list item and email them automatically, this tutorial is for you. I’ll walk you through building the entire flow from scratch — step by step — and I’ll also cover the variations and errors that trip people up most often.

I’ve worked with SharePoint and Power Automate for over 15 years, and this flow looks simple but has a few hidden gotchas. Let me save you the time spent debugging.

Quick Answer

To get attachments from a SharePoint list item using Power Automate:

  1. Trigger the flow (manual or automated)
  2. Initialize an array variable to hold the attachments
  3. Use Get items with a filter to find the right list item
  4. Use Get attachments to list the files on that item
  5. Use Get attachment content inside an Apply to each loop to read each file
  6. Append each file’s name and content to the array
  7. Use Send an email (V2) and pass the entire array as the Attachments field

What We’re Building

The scenario here: you have a SharePoint list called Employee List with an Attachments column. When someone runs this flow and types in an Employee ID, it grabs all the files attached to that employee’s list item and emails them to a specified address.

Here’s what the Employee List looks like:

  • EmployeeID — the Title column (default)
  • EmployeeName — single line of text
  • EmployeeStatus — choice column
  • Attachments — the built-in attachments column
Power Automate Send SharePoint files as attachments

Before you build this, make sure the Attachments column is turned on in your list. Go to List Settings → Advanced Settings → set “Allow attachments” to Yes. If this is off, the Get Attachments action will always return an empty array, and you’ll spend an hour wondering why.

Before You Build: Checklist

  • ✅ Attachments are enabled in the SharePoint list settings
  • ✅ You have at least one list item with files already attached (for testing)
  • ✅ You have a Power Automate license (or Microsoft 365 plan that includes it)
  • ✅ You have permission to access the SharePoint site and the list
  • ✅ The files you’re attaching are under 25MB each (Outlook’s limit)

Get attachments from a SharePoint list item using Power Automate

Now we will see how to get attachments from a SharePoint list item using Power Automate.

Step 1: Create the Flow and Set Up the Manual Trigger

Go to make.powerautomate.com and create a new Instant cloud flow.

When prompted for a trigger, select Manually trigger a flow.

Once the trigger is on the canvas, click on it to expand it. Then click + Add an input and choose Text. Rename the input to EmployeeID.

How to Send SharePoint List Attachments via Email with Power Automate

This is how the person running the flow tells it which employee’s attachments to fetch. Later, we’ll use this value in a filter query.

Step 2: Initialize an Array Variable

Click + New step and search for Initialize variable.

Configure it like this:

  • Name: AttachmentsArray
  • Type: Array
  • Value: leave blank
Retrieve SharePoint List Attachments with Power Automate

We’re going to use this array to collect all the attachments before we send the email. Think of it as a temporary bag we’re packing with files before handing it to the mail action.

Step 3: Get the Right List Item Using a Filter Query

Click + New step and search for Get items (the SharePoint action).

Configure it:

  • Site Address: your SharePoint site URL
  • List Name: your Employee List name
  • In Filter Query, enter:
Title eq '@{triggerBody()?['text']}'
Send SharePoint list item attachments by mail using Power automate

A few things to note here:

  • Title is the internal name of the EmployeeID column (it’s the default Title column)
  • triggerBody()['text'] pulls in whatever the person typed as the EmployeeID input
  • The single quotes around the expression are required for text comparisons in OData

If your EmployeeID is a number column instead of text, drop the single quotes:

Title eq '@{triggerBody()?['text']}'

Step 4: Loop Through Items and Get Each Attachment

This is where the real work happens. We need three nested actions.

4a. Apply to Each (outer loop — iterating over list items)

Click + New step and add an Apply to each action. Set the output to value from the Get items step. This handles the case where your filter returns more than one list item.

4b. Get Attachments (inside the outer loop)

Inside the Apply to each, add a Get attachments (SharePoint) action.

  • Site Address: same SharePoint site
  • List Name: same list name
  • Id: click into the field and select the dynamic content ID from the Get items step
How to Read SharePoint List Item Attachments and Send an email in Power Auotmate

This action returns the list of files attached to that item — it doesn’t download the file contents yet, just the metadata (file names, identifiers).

4c. Get Attachment Content (Power Automate auto-nests this)

Add another action: Get attachment content (SharePoint).

  • Site Address: your SharePoint site
  • List Name: your list
  • Id: same ID dynamic content as above
  • File Identifier: click on the field and select Id from the Get attachments dynamic content output
Power Automate Save Email Attachments To SharePoint

As soon as you set the File Identifier, Power Automate will automatically wrap this action in a second Apply to each loop. That’s expected — it’s now looping through every individual attachment file.

4d. Append Each File to the Array

Inside that inner Apply to each loop, add an Append to array variable action.

  • Name: select AttachmentsArray (the variable we created in Step 2)
  • Value: paste this expression (switch to the Expression tab, not Dynamic content):
{
"name": "@{items('For_each')?['DisplayName']}",
"contentBytes": {
"$content-type": "@{body('Get_attachment_content')?['$content-type']}",
"$content": "@{body('Get_attachment_content')?['$content']}"
}
}

Let me break down what each line is doing:

LineWhat it does
items('Apply_to_each')?['DisplayName']Gets the file name (e.g., invoice.pdf)
body('Get_attachment_content')?['$content-type']Gets the file type (e.g., application/pdf)
body('Get_attachment_content')?['$content']Gets the actual file content, encoded in Base64
Sending an Email with Multiple Attachments in Power Autoamte

This is the structure that the Send an email (V2) action expects. If you use a different structure (for example with content instead of $content), the email action will throw a deserialization error. I’ve seen this catch a lot of people who try to use this same array with the Approval action — the Approval connector uses content, not $content. Keep that in mind if you ever need to adapt this.

Step 5: Send the Email with Attachments

Outside both loops, add a Send an email (V2) action.

  • To: the recipient’s email address (or a dynamic value from your list)
  • Subject: something like Employee Documents – @{triggerBody()['text']}
  • Body: whatever message makes sense for your scenario

Now click Show advanced options at the bottom of the action.

Find the Attachments field. You’ll see a toggle that lets you switch between entering individual attachments or an entire array. Switch it to Enter entire array, then click into the field and select AttachmentsArray from the dynamic content panel.

Power Automate Get attachments in SharePoint list item and send to email

That’s it. This single step sends the entire array of files as email attachments.

Step 6: Save and Test

Save the flow, then click Test → Manually → Run flow.

In the input field, type an EmployeeID that you know has attachments in your list. Click Run flow.

Power Automate Get attachment from SharePoint list and send email

Watch the flow run. If it succeeds, check the email — you should see all the attachments from that list item arrive in the email.

Power Automate Get Attachments from a SharePoint List Item and Send by Email

If you want to verify visually, go to your SharePoint list, open the item, and confirm how many files are attached. That number should match the one that arrives in the email.

Common Errors and How to Fix Them

This is the section I wish every tutorial had. Here are the issues I see most often with this flow:

1. Get Attachments returns an empty array []

The most common cause: attachments aren’t enabled on the list. Go to your list → Settings → Advanced Settings → set “Allow attachments” to Yes, then republish the list settings.

Another cause: if your flow uses the When an item is created trigger, the item gets created before the attachments are saved, so the flow runs before the files exist. Fix this by either adding a Delay action (30–60 seconds) after the trigger, or by changing the trigger to When an item is modified so it catches the state after attachments are added.

2. Filter Query returns 0 items

Check the OData syntax carefully. For text columns, the value must be wrapped in single quotes. For number columns, no quotes. Also check that you’re using the column’s internal name, not its display name. You can find the internal name in List Settings → click the column name → look at the URL (the Field= parameter is the internal name).

3. Email fails with an attachment size error

Outlook (and therefore the Send an email V2 action) has a 25MB limit per message. If your SharePoint list item has large files, the email will fail silently or throw a connector error. In that case, consider saving the files to OneDrive and sending a sharing link instead — I’ll cover that variation below.

4. Expression errors in the Append to array step

Make sure you’re entering the JSON expression in the Expression tab, not the Dynamic content tab. The entire block needs to be treated as a single expression. If you paste it into the wrong field, you’ll get a parse error.

5. Nested Apply to Each causing unexpected behavior

If you add any additional actions after the Get attachment content step but accidentally place them inside the inner loop, they’ll run once per file instead of once per item. Double-check that the Append to array action is inside the inner loop, and the Send email action is completely outside both loops.

Variations for Different Use Cases

Variation 1: Use an Automated Trigger Instead of Manual

If you want this to run automatically — say, every time a specific list item is modified — replace the manual trigger with When an item is modified (SharePoint).

In this case, you don’t need the Filter Query at all. The trigger already gives you the specific item’s ID. Use that ID directly in the Get attachments action.

The rest of the flow stays the same.

Variation 2: Send to a Dynamic Recipient from the List

If your list has an email column (like EmployeeEmail), you don’t need to hardcode the To address. In the Send an email action, click the To field and select the dynamic content from your list item (e.g., EmployeeEmail from the Get items output).

Variation 3: Handle Multiple Items Returned by the Filter

If your filter query might return more than one item (for example, filtering by EmployeeStatus = “Active” rather than a unique ID), the flow already handles it — the outer Apply to each loop iterates over each matching item. Just know that the email will include attachments from all matching items combined in one array.

If you need separate emails per item, move the Send email action inside the outer Apply to each loop (but still outside the inner loop).

Variation 4: Save Attachments to OneDrive Instead of Emailing

If the files are large or you want to store them somewhere rather than send them, replace the Send email action with a Create file action (OneDrive for Business).

Inside the inner Apply to each loop, add:

  • Create file → OneDrive
  • Folder Path: wherever you want to save them
  • File Name: use items('Apply_to_each')?['DisplayName']
  • File Content: use body('Get_attachment_content')

This saves each attachment directly to OneDrive without hitting Outlook’s size limit.

Variation 5: Filter Attachments by File Type

If your list item has mixed file types (PDF, Word, images) and you only want to email PDFs, add a Condition action inside the inner loop, before the Append to array step.

Check:

items('Apply_to_each')?['DisplayName']

ends with .pdf

Only run the Append to array step in the Yes branch.

Full Flow Structure at a Glance

Here’s the complete flow structure so you can verify yours matches:

Manually trigger a flow
└── EmployeeID (text input)

Initialize variable
└── AttachmentsArray (Array, empty)

Get items (SharePoint)
└── Filter: Title eq '@{triggerBody()['text']}'

Apply to each (outer — iterates list items)
└── Get attachments (SharePoint)
└── Id: ID from Get items

└── Apply to each (inner — auto-created, iterates files)
└── Get attachment content (SharePoint)
└── File Identifier: Id from Get attachments

└── Append to array variable
└── AttachmentsArray ← JSON expression with name + contentBytes

Send an email (V2) ← OUTSIDE both loops
└── Attachments: AttachmentsArray (entire array mode)
Get Attachments from a SharePoint List Item and Send by Email in Power Automate

You may also like:

Frequently Asked Questions

Can I get attachments from multiple list items at once?

Yes. If your Get items filter returns multiple items, the outer Apply to each loop handles all of them. All their attachments get collected into the same array and sent in one email.

What’s the maximum file size Power Automate can handle for attachments?

The Send an email (V2) action uses Outlook, which has a 25MB message size limit. For larger files, save them to OneDrive and send a link instead.

How do I get attachments without sending an email?

Use the Get attachments and Get attachment content actions to retrieve the files, then use a Create file (OneDrive) or Copy file action to store them somewhere. You don’t have to use an email action at all.

Why does my flow work manually but fail on an automated trigger?

If you’re triggering on item creation, the attachments may not be saved yet when the flow starts. Add a Delay action (30–60 seconds) right after the trigger to give SharePoint time to commit the attachment data.

Can I use this same attachment array with the Approval action?

Not directly. The Send an email (V2) action expects $content inside the contentBytes object. The Approval action expects content (no dollar sign). You’ll need to build a separate array with the correct property name for Approval flows.

Does this work for document libraries too?

Not quite — document libraries don’t use the Attachments concept the same way. For libraries, use Get files (properties only) and Get file content actions instead of Get attachments. The array-building and email logic are the same.

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…