Add Attachments to SharePoint List Items using Power Automate [3 Different examples]

In this Power Automate tutorial, I will show you, how to add attachments to SharePoint list items using Power Automate. Also, we will discuss, how to add multiple attachments to a SharePoint Online list item using a flow or Power Automate.

In the last, I will show you, how to add email attachments to a SharePoint list item using Power Automate. Also, I will explain, how to add attachments from one drive to SharePoint list items using Power Automate.

By default, the attachment column is not visible in the SharePoint list view, to view attachments we need to enable it. To enable the attachment column in the SharePoint list:

Open the SharePoint list view, click on + Add column –> Show/hide columns. Then select the Attachments and click on the Apply button.

Add attachments to SharePoint list items  Power Automate

Once the attachment column has been added to the SharePoint List view, it looks like the below:

Add attachments to SharePoint list item using Power Automate

Add attachments to a SharePoint list item using Power Automate

Here we will see how to add attachments to a SharePoint list item using Power Automate.

In this example, we will add four input fields called Employee ID, Employee name, and Employee status which is of text type, and the Attachment which is of File content type in the trigger action.

Once the Flow Triggers, a new item will be created in the SharePoint list along with an attachment.

  • Login to Power Automate, and create an instant cloud flow. Expand the trigger and pass the input values.
  • Then we will add a text input for Employee ID, Employee name, and Employee status and a file content input for an attachment.
add attachment in power automate
  • Select the new step and add a create item action and Provide the SharePoint site address and the list name.
  • Now Pass the dynamic content values for the Title, EmpName, and EmployeeStatus fields
Add Attachments to SharePoint List Items using Power Automate
  • Select the new step, choose Add attachments, and pass the created SharePoint list item ID.
  • Then add the File Name and select the File content from the dynamic content values.
add attachment to SharePoint Online list item using power automate

Save and Test the flow. Enter the Employee ID, Employee Name and Employee Status details and click on the Run flow:

Add Attachments to SharePoint List Items using Power Automate

Our flow ran successfully, and an item will be created in the list item with an attachment.

add attachment to SharePoint list item using power automate flow

The screenshot below shows that the new list item has been added along with the Attachment in the SharePoint list.

Example to add attachment to SharePoint Online list item using power automate

This is how to add attachments to the SharePoint list item using Power Automate.

See also  How to convert word to pdf using Power Automate [without a premium connector]

Add Multiple attachments to a SharePoint list item using Power Automate

Here we will see how to add multiple attachments to the SharePoint list item using Power Automate flow.

First, we will create a SharePoint document library and the multiple files to it, Once the flow triggers it reads all the files from the document library and create a new list item along with the multiple attachments.

Here I have created a document Library as “Files to be Attach” and added multiple files to the library.

Multiple attachments to the SharePoint list item

Follow the below steps, to add multiple attachments to the SharePoint list item:

Step:1

Create an instant cloud flow, Expand the trigger, and Add a text input for EmpID, EmpName, and Employee Status.

Multiple attachments to SharePoint list item

Step:2

Now we will initialize a variable by selecting initialize variable action and later we use it in our flow, Enter the Variable name and choose the variable type as Array.

  • Name: Provide the variable name
  • Type: Type of variable
Add Attachments to SharePoint List Items using Power Automate

Step:3

Choose the Get files(Properties Only) action from action triggers. Configure the SharePoint site address and the library name.

  • Site Adress: Provide the site address
  • Library Name: Select your library name
Example to add Multiple attachments to the SharePoint list item using flow

Step:4

  • Select the Get File content action and pass the identifier from the previous step as a dynamic content value.
  • It will automatically changes apply to each action based on the files presented in the library.
Example to add Multiple attachments to SharePoint list item using flow

Step:5

We will add a compose data operation and pass the JSON values to get the file name and folder path and file type for all the files presented in the document library.

{
    "inputs": {
        "alias": "@items('Apply_to_each')?['{Name}']",
        "resourceLink": "@items('Apply_to_each')?['{Path}']",
        "type": "Other"
    }
}
Example to add Multiple attachments to SharePoint list using flow

Step:6

Now select an Append to an array variable action select the initialized array and pass the output of the compose action.

Add Multiple attachments to the SharePoint list item using flow example

Step:7

Select the New step and add a compose action and pass the Ouputs of the variable action.

Add Multiple attachments to SharePoint list item using flow example

Step:8

Choose a create item action and configure the SharePoint site address and list name and pass the Dynamic content values for EmpID, EmpName, and Employee Status.

Add Multiple attachments to SharePoint list item using Power Automate flow

Step:9

  • Add a new step and choose the Add attachment action and Provide the required fields like SharePoint site address, SharePoint list name, ID, and File name with extension.
  • In the File content field, pass the output of the File content Values compose data operation.
Add Multiple attachments to the SharePoint list item using Microsoft flow

Step:10

Save and Test the flow by selecting the run flow option. Provide EmpId, EmpName, and Employee Status, and Click on the Run flow option.

Add Multiple attachments to SharePoint list item using Power Automate

Once the flow ran successfully like below:

Add Multiple attachments to the SharePoint list item using Power Automate

We can a new SharePoint list item has been added along with Multiple attachments using flow:

Add Multiple attachments to SharePoint list item using Power Automate flow

This is how to add multiple attachments to the SharePoint list item using Power Automate flow.

See also  How to merge arrays in Power Automate?

Add email attachment to SharePoint list Using Power Automate

Let us see how to add email attachments to the SharePoint list item using Power Automate.

Here we will use the default template named ‘Create item and add attachments to a SharePoint list on a new email arrival‘ on Power Automate. Choose the template and then click on Continue to create an automated flow:

Add email attachment to the SharePoint list Power Automate

Make sure the SharePoint list has been created. Here we will use the training Feed back list below which has a Name(Title column) and Attachments column.

Add email attachment to the SharePoint list Power Automate example
Add email attachment to the SharePoint list Power Automate example
  • Expand the new email arrives trigger action and choose the inbox folder in the section.
  • In the same way, select create item action and configure the SharePoint site address and list name.
C:\Users\TSinfo\Desktop\Example to Add email attachment to the SharePoint list Power Automate

Again, in the Add attachment action, insert the SharePoint Site address and List name:

Add email attachment to SharePoint list Power Automate example
Add email attachment to SharePoint list Power Automate example

Save and test the Power Automate flow, by selecting the Test flow option and sending an email to Outlook along with the attachments. Once the flow ran successfully like below:

Example to Add email attachment to SharePoint list Power Automate example

We can see the new item has been created with an attachment in the SharePoint list.

Example to Add email attachment to SharePoint online list Power Automate

This is how to add email attachments to the SharePoint list item using Power Automate.

Add attachment from one drive to SharePoint list item using Power Automate

Now, let us see, how to add an attachment from one drive to a SharePoint list item using Power Automate.

In this example, we will use the Training Feedback list consisting of the Name and Attachments column.

  • Name – Default title column
  • Attachments – Attachment Column
Add attachment from one drive to SharePoint list item using Power Automate

Here we will create a flow to add attachments to the SharePoint list item from one drive using Power Automate,

  • Login to Power Automate, and create an instant cloud flow. Expand the trigger and add an input value Name which is of Text data type.
Add attachment from one drive to SharePoint list item using Power Automate example
  • Then we will use create item action to add a list item to the SharePoint list. Configure the SharePoint site Address and List Name.
  • And pass the dynamic content value Name in the Title field.
Example to Add attachment from one drive to SharePoint list item using flow

Add a new step and select Get the file contents using OneDrive’s Get File content action from action triggers.

Add attachment from one drive to SharePoint list item using flow
  • Select the new step, choose Add attachments action, and pass the created SharePoint list item ID.
  • Then Enter the File Name and select the File content from the output of the get file content action.
Add attachment from one drive to SharePoint list item using flow example

Save and Test the flow. Enter the input Name value and click on the Run flow:

Add attachment from one drive to SharePoint list item

Our flow ran successfully, and an item will be created in the list item with an attachment.

Add attachment from one drive to SharePoint list item example

The screenshot below shows that the new list item has been added along with the Attachment in the SharePoint list.

Example to Add attachment from one drive to SharePoint list item

This is how to add attachments to the SharePoint list item from one drive using Power Automate.

See also  Power BI Export Data - Complete tutorial

Example-2

Here we will see another example, to add an attachment to the SharePoint list from one drive with an extension using Power Automate.

We will use the same Training Feedback list consisting of the Name and Attachments column.

Here when we get file content from One Drive, we will add a file extension along with the attachment. Follow the below steps, to achieve it

  • Login to Power Automate, and create an instant cloud flow. Expand the trigger and add the text input value for Name.
  • Then we will use create item action to add a list item to the SharePoint list. Provide SharePoint site Address and List Name.
  • And Pass the dynamic content value for the Name in the Title field.
attachment from one drive to SharePoint list item using Power Automate

Add a new step and select Get the file contents using OneDrive’s Get File content action from action triggers.

attachment from one drive to SharePoint list item using Power Automate flow
  • Select the new step, choose Add attachments, and pass the created SharePoint list item ID.
  • Then Enter the File Name with the extension and select the File content from the output of the get file content action.
attachment from one drive to SharePoint list item using Power Automate example

Save and Test the flow. Enter the input value and click on the Run flow:

Add attachment from one drive to SharePoint list item example

The screenshot below shows that the new list item has been added along with the Attachment in the SharePoint list.

Example to add attachment from one drive to SharePoint list item using the flow

This is how to add an attachment to the SharePoint list from one drive with an extension using Power Automate.

In this Power Automate tutorial, we saw how to add an attachment from one drive to a SharePoint list item using Power Automate with examples.

Conclusion

In this Power Automate tutorial, we saw how to add attachments to a SharePoint list item using Power Automate. Also, we covered below examples as well:

  • Add Multiple attachments to the SharePoint list item Power Automate
  • Add email attachment to SharePoint list item Power Automate
  • Add attachment from one drive to SharePoint list item using Power Automate

You may also like:

>