How to Move Microsoft Lists Attachments to SharePoint Folders
Question details
The user wants to automatically categorize and move attachments from Microsoft Lists into specific SharePoint folders using Power Automate.

- Product
- Power Automate
- Device & OS
- not provided
- Scenario
- Organizing multiple attachments uploaded to a Microsoft List item into distinct SharePoint folders by category, as Lists does not natively support separate attachment columns.
- Observed behavior
- Attachments remain grouped in a single List item and need to be automatically routed to specific SharePoint directories based on text in their file names or metadata.
Ensure you have the necessary permissions to create flows in Power Automate, read access to the source Microsoft List, and write access to the destination SharePoint document library.
Use Power Automate to Filter and Move Attachments
Create a Power Automate flow that triggers when an item is created or modified, checks the attachment names for specific keywords, and moves them to corresponding folders.
Since Microsoft Lists does not support separate attachment columns natively, you can use Power Automate to process uploaded files. By utilizing a Filter Array or a Condition block within an 'Apply to each' loop, the flow can identify files based on naming conventions and route them to designated SharePoint folders.
Start a new automated cloud flow. Add the 'When an item is created or modified' trigger for SharePoint and select your Site Address and List Name. Next, add the 'Get attachments' action, linking it to the ID of the triggered item.
Add an 'Apply to each' control and select the 'Body' output from the 'Get attachments' action to loop through every file uploaded to the list item.
Inside the loop, add a 'Condition' action. To check for a category keyword in the file name, use an expression like: contains(replace(item()?['DisplayName'],'_',' '),'Category Blue'). This will return true if the file name contains your specific category.
In the 'If yes' branch of your condition, add the 'Get attachment content' action. Select your Site Address, List Name, Item ID, and the File Identifier from the current item in the loop.
Still in the 'If yes' branch, add the 'Create file' action for SharePoint. Select the destination Folder Path for 'Category Blue'. Use the 'DisplayName' from the attachment for the File Name, and the 'Attachment Content' for the File Content.

Enhance Your Document Productivity with WPS Office
While Power Automate handles your SharePoint file organization, you need a reliable suite to create and edit those documents. WPS Office is a robust, lightweight alternative to Microsoft Office that opens seamlessly and saves resources.

Frequently Asked Questions
Do the attachments get deleted from the Microsoft List after being moved?
No, the 'Create file' action in Power Automate only copies the file to the SharePoint folder. If you want to move the file completely, you must add a 'Delete attachment' action to your flow after the file is successfully created.
Can I filter attachments by file extension instead of text keywords?
Yes, you can modify your Condition in Power Automate to check the file extension. For example, you can use the expression endsWith(item()?['DisplayName'], '.pdf') to route only PDF files to a specific SharePoint folder.
Why is my Power Automate flow failing at the 'Create file' step?
This commonly happens if you forget to include the 'Get attachment content' step before creating the file, or if the account running the flow lacks write permissions to the destination SharePoint folder. Ensure you map the correct 'Attachment Content' dynamic data into the File Content field.




