While working on Power Automate, I was required to manually save attachments from a SharePoint list into a SharePoint document library. The goal was that when an item was created in the SharePoint list, any attachments should be automatically saved into a specific SharePoint library. And yes, of course, we can achieve this using Power Automate.
However, another requirement came: the attachments needed to be stored in a folder within the library, with the folder named using a combination of the item’s title, ID, and the current year.
In this tutorial, I will show you how to save SharePoint list attachments to a SharePoint library using Power Automate and store them in a folder within that library.
Save SharePoint List Attachments to a SharePoint Library Using Power Automate
For this example, I created a SharePoint list of Employee Requests using the below column and data types:
| Column | Data Types |
|---|---|
| Request Title | Single line of text (Title) |
| Requester Name | Person or Group |
| Request Date | Date and time |
| Request Status | Choice |
| Request Description | Multiple lines of text |
| Attachments | hyperlink |

I also created a SharePoint library, which is Request Attachments:

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.

2. Now, I need to add a condition action that checks whether this item has any attachments or not. To do this, I added a condition to select the Has attachment (from When an item is created dynamic content) is equal to true (From expression).

3. Inside the true section, add the get attachment action with the below parameter:
- Site Address: Select a specific SharePoint site from drop-down.
- List Name: Choose a particular list.
- Id: Select Id from dynamic content under When an item is created.

4. After that, take the Get attachment content action to retrieve the details from the attachment. Then, Provide the below parameters:
- Site Address: Select a specific SharePoint site from drop-down.
- List Name: Choose a particular list.
- Id: Select Id from dynamic content under When an item is created.
- File Identifier: Take Id from the dynamic content of Get attachments.
You can see that a For each loop will be added automatically, taking Body outputs from Get attachments.

5. Inside for each loop, add a create file action, which creates a file in the sharepoint library. To do this, I added a create file action with the below Parameters:
- Site Address: Choose the SharePoint site from the dropdown.
- Folder Path: Select the folder from the Show Picker where you want to store the copied files.
- File Name: Use the dynamic content value ‘Name’ for the file name.
- File Content: Add the ‘File content’ from the dynamic content.

Once the flow is ready, we will move forward with running it.
Run flow to Save SharePoint List Attachments to a SharePoint Library
Now click on Save and run the Flow manually. Then, add an item with an attachment to the SharePoint list.

After the flow runs successfully, go to the SharePoint library, and you will see that the file has been created.

You can Save SharePoint Attachments in a SharePoint library using Power Automate.
Save SharePoint List Attachments to a SharePoint Library Folder Using Power Automate
I hope you create the flow mentioned above. I will then edit the flow and show how we can save SharePoint attachments to a folder in a SharePoint library.
Edit the above flow, and after the get attachment action, add a Create new folder action with the below parameter:
- Site Address: Select a specific SharePoint site from drop-down.
- List Or Library: Choose a particular library where you want to create a folder.
- Folder Path: here, according to my requirement (item’s title, its ID, and the current year), I give the below expression:
concat(triggerBody()?['Title'],'-',triggerBody()?['ID'],'-',formatDateTime(utcNow(),'yyyy'))This formula takes the ‘Title’, ‘ID’, and the current year, and combines them into one string with dashes between them. For example, if the ‘Title’ is “Report”, the ‘ID’ is “123”, and the current year is 2024, the result would be: “Report-123-2024“

Then click on the create file action and delete the Folder Path. After that, provide the below expression:
concat(body('Create_new_folder')?['{Path}'],'/',concat(triggerBody()?['Title'],'-',triggerBody()?['ID'],'-',formatDateTime(utcNow(),'yyyy')))This formula combines the base folder path with a newly constructed folder name. For example, if the base folder path is /Documents/Reports, the ‘Title’ is “Report”, the ‘ID’ is “123”, and the current year is 2024, the resulting folder path will be: /Documents/Reports/Report-123-2024

Then, save the flow, and we will continue running it.
Run the Flow to Save SharePoint List Attachments to a SharePoint Library Folder
Now click on Save and run the Flow manually. Then, add an item with an attachment to the SharePoint list.

After the flow runs successfully, go to the SharePoint library, and you will see that the Folder has been created. Then, when you open that folder, you can see the attachment files.

I hope you follow all the steps to Save a SharePoint Attachment to a Folder in a SharePoint Library using Power Automate.
Related Power Automate tutorials:
- Send an Approval Request With an Attachment Using Power Automate
- Auto Approve Request Using Power Automate
- Send an Email With Attachment From SharePoint List using Power Automate
- Save Email Attachments to SharePoint using Power Automate
- Save Office 365 Email Attachments to OneDrive for business using Power Automate

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.