How to Add Attachments to SharePoint List Items using Power Automate? [5 Different Examples]

When working in Power Automate, one of my team members recently asked how they could automatically add attachments to SharePoint list items. This is a great question because attachments, like documents or images, are often important for SharePoint list items.

In this tutorial, I will show you how to add attachments to SharePoint list items using Power Automate. Whether you need to attach one or multiple files or even automate adding attachments from emails or OneDrive, this tutorial will guide you through everything.

We will also learn how to use the REST API to add attachments to SharePoint list items with Power Automate.

Add Attachment action in Power Automate

The Add Attachment action in Power Automate allows you to attach files to items in a SharePoint list or document library. This action is commonly used when automatically attaching a file (such as a document or image) to a SharePoint list item or a document library item.

Power Automate Add Attachment action accepts parameters:

  • Site Address: The URL of the SharePoint site where the list is located.
  • List Name: The name of the SharePoint list where the attachment will be added.
  • Id: The unique ID of the SharePoint list item to which the attachment will be added.
  • File Name: The name of the file being attached. It should include the file extension (e.g., “Document.pdf”).
  • File Content: The file content is attached. This is typically the file content in binary format. You might retrieve it from previous actions like “Get file content” or “Create file.”
What is the Add Attachment action in Power Automate

Add Attachments to SharePoint List Items Using Power Automate

Suppose you work for a project management team, and you want to log tasks into a SharePoint list and attach related documents (e.g., task briefs or reference files). The flow should allow team members to manually trigger the process, input task details, and upload a file that will be attached to the task.

For this example, I created a SharePoint list called Task Tracker:

add multiple attachments to sharepoint list item power automate

Now follow the below steps:

1. In the Power Automate, click the Instant Cloud flow, enter the Flow name, and choose the trigger flow (i.e., manually trigger a flow).

Next, we will add a text input for Task Name, Assigned To, and Description, a date input for Due Date, and a file content input for an attachment.

power automate add attachment to sharepoint list

2. Then add the Create Item action to add the SharePoint item and provide the below parameters:

  • Site Address: Select your SharePoint site address from the drop-down.
  • List Name: Select the SharePoint list where the task is stored.
  • Task Name: Provide Task name dynamic content from the trigger input.
  • Assigned To: Provide Assigned To dynamic content from the trigger input.
  • Due Date: Provide Due Date dynamic content from the trigger input.
  • Description: Provide a Description of dynamic content from the trigger input.
add attachment to sharepoint list power automate

3. Then add the Add attachments action and provide the below parameters:

  • Site Address: Select your SharePoint site address from the drop-down.
  • List Name: Select the SharePoint list where the task is stored.
  • Id: Use the ID from the Create Item action.
  • File Name: Provide the File content name from the trigger.
  • File Content: Provide the File content contentsBytes from the trigger.
how to add attachment in sharepoint list using power automate

Save and Test the flow. Enter the Task Name, Assigned To, Due Date, Description, and Attchemtent file and click on the Run flow:

power automate attach file to sharepoint list item

After the flow runs successfully, go to the SharePoint list, and you will see the item created with the attachments.

Add Attachments to SharePoint List Items using Power Automate

How to Add Multiple Attachments to a SharePoint List Item Using Power Automate?

Imagine you are managing an employee onboarding process, and each new hire must submit several documents, such as a resume, ID proof, and a signed contract. You have a SharePoint list called “Employee Onboarding Tracker” with the following columns:

power automate save email attachment to sharepoint

As part of the onboarding process, I have a document library that contains employee documents. I want to retrieve an employee’s documents from the library and add them as attachments when an item is created in the SharePoint list.

sharepoint list attachment column in Power Automate

Now follow the below steps:

1. Create an automated cloud flow. Give the flow name and select the trigger When an item is created. Also, provide the Site Address and List Name.

Add attachments to SharePoint list Power Automate

2. Add Initialize variable action, enter the variable name, and choose the variable type as Array.

Example to add Multiple attachments to the SharePoint list item

3. Next add Get files(Properties Only) action and provide below parameters:

  • Site Address: Provide the site address
  • Library Name: Select your library name
  • Filter Query: Provide the below expression:
EmployeeID eq '@{triggerBody()?['EmployeeID']}'
Example to add Multiple attachments to the SharePoint list item using flow

4. Then, add the Get file content action, provide the site address, and pass the File Identifier from the dynamic content of the Get files (properties only) action.

Then, it will automatically add a For each loop.

add Multiple attachments to SharePoint list item using Power automate

5. Inside the for each add Add attachment action and provide below parameters:

  • Site Address: Select the site address from the drop-down.
  • List Name: Choose the list Name from the drop-down.
  • Id: Use the ID of the item created.
  • File Name: Use the “Name” property of the file from the “Get files (properties only)” action.
  • File Content: Use the output of the “Get file content” action.
Add Multiple Attachments to a SharePoint List Item Using Power Automate

Now, it’s time to save the flow. Click on Test -> Select Manually. Add an item to the SharePoint list.

Add Multiple attachments to the SharePoint list item using Microsoft flow

After the flow runs successfully, refresh your SharePoint list, and you will see two attachments added to the SharePoint list item.

How to Add Multiple Attachments to a SharePoint List Item Using Power Automate

Add Email Attachment to SharePoint List Using Power Automate

Suppose you are managing a support ticketing system where clients email their issues. Each email may contain important attachments such as screenshots, logs, or documents. You want to automate the process of extracting these email attachments and adding them as files to items in a SharePoint list called “Support Tickets”.

Add Multiple attachments to SharePoint list item using Power Automate flow

Now follow the below steps:

1. Create an automated cloud flow. Give the flow name and select the trigger When a new email arrives (V3). Select Folder from Advanced parameters and provide the Inbox from the drop-down.

Add email attachment to the SharePoint list Power Automate

2. Add Create item action and provide the below parameters:

  • Site Address: Select the site address from the drop-down.
  • List Name: Choose the list Name from the drop-down.
  • Subject: Provide subject from dynamic content.
Power Automate Add Email Attachment to SharePoint List

3. Next, add the Get attachment action from Outlook. Provide the Message ID and Attachment ID from the When a new email arrives action.

Then, it will automatically add a For each loop.

Add Email Attachment to SharePoint List Using Power Automate

4. Inside the for each add Add attachment action and provide below parameters:

  • Site Address: Select the site address from the drop-down.
  • List Name: Choose the list Name from the drop-down.
  • Id: Use the ID of the item created.
  • File Name: Provide the attachment’s Name from the “Get attachment” action.
  • File Content: Provide content Bytes from the “Get attachment” action.
Add Email Attachment to SharePoint List in Power Automate

Now, click on save and run the flow manually. When you receive an email in the inbox, the flow runs:

How to Add Email Attachment to SharePoint List Using Power Automate

After the flow runs successfully, go to the SharePoint list, and you will see the attachment added.

Power Automate Add Email Attachments to SharePoint List

Add Attachments from OneDrive to SharePoint List Items Using Power Automate

Suppose you manage a project tracking system you want when a new project is created in the “Project Tracker” SharePoint list; you want to automatically attach the Terms and Conditions (PDF) file stored in OneDrive to the new SharePoint list item.

Now follow the below steps:

Create an automated cloud flow When an item is created, trigger. Then, add the Get file content action from OneDrive and select your file from onedrive.

Add Attachments from OneDrive to SharePoint List Items Using Power Automate

Next, add the Add attachment action and provide the below parameters:

  • Site Address: Select the site address from the drop-down.
  • List Name: Choose the list Name from the drop-down.
  • Id: Use the ID of the item created.
  • File Name: Provide the attachment’s Name.
  • File Content: Provide file content from the “Get file content” action.
Add Attachments from OneDrive to SharePoint List Items in Power Automate

Now, it’s time to save the flow. Click on Test -> Select Manually. Add an item to the SharePoint list.

Power Automate Add Attachments from OneDrive to SharePoint List Items

After the flow runs successfully, refresh your SharePoint list, and you will see an attachment added to the SharePoint list item.

How to Add Attachments from OneDrive to SharePoint List Items Using Power Automate

Add Attachments to SharePoint List Items using Power Automate Rest API

In the above example, we saw how to add attachments using the Add attachment action. I will show you how to add attachments using the REST API.

Now follow the below steps:

Create an automated cloud flow with when an item is created trigger. Then, add the Get file content action from OneDrive and select your file from onedrive.

Add Attachments to SharePoint List Items using Power Automate Rest API

Then add Send an HTTP request to SharePoint action and provide the below parameters:

  • Site Address: Provide the SharePoint tenant address
  • Method: Select method as Post from the drop-down
  • Uri:
_api/web/lists/getbytitle('List Name')/items(List ID)/AttachmentFiles/ add(FileName='Attachment Name with extension')
  • Header: Use the below headers to make REST API calls to SharePoint:
Accept: application/json
Content-Type: application/json
  • Body:  Provide only file content:
"Contents of file"
How to Add Attachments to SharePoint List Items using Power Automate Rest API

Now, it’s time to save the flow. Click on Test -> Select Manually. Add an item to the SharePoint list.

How to Add Attachments to SharePoint List Items in Power Automate Rest API

After the flow runs successfully, refresh your SharePoint list, and you will see an attachment added to the SharePoint list item.

Add Attachments to SharePoint List Items in Power Automate Rest API

Conclusion

This tutorial explored various ways to add attachments to SharePoint list items using Power Automate. We started with the Add Attachment action, where we attached single and multiple files to list items.

We then covered advanced scenarios, such as adding email attachments to list items, attaching files from OneDrive, and automating file attachments from a document library. Lastly, we learned to use the REST API to add attachments to SharePoint List Items using Power Automate.

>

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…