web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copy SharePoint List a...
Power Automate
Answered

Copy SharePoint List attachments to SharePoint documents based on specific filenames

(0) ShareShare
ReportReport
Posted on by 33

Good day!

 

I have a flow that pulls the attachments and copies them to a SharePoint document folder when a new item is created on a SharePoint list. This works great, but I need to add a feature. I have eight files that users can already download and use to attach to the list. Eight folders in the document library correspond with each of the eight files. At times, when attaching a file to the SP list, it renames the file by adding numbers to the end (or the user might rename the file slightly.) 

I want to check the file name on the SP list and move it to the correct folder for easy retrieval. For example, we have "Confined Space Documents.pdf" and "Incident Report Form.pdf" that we want to go into the "Confined Space Documents" or "Incident Report Form" folder with the username and date as the filename. My current process creates a new folder depending on the file name. Still, we want the "Confined Spaces Documents" files to go into the "Confined Spaces Documents" folder, no matter if the file is named "Confined Spaces Documents (1).pdf" or "Confined Spaces Documents 2001502.pdf."

Any ideas to make this happen efficiently? 

Categories:
  • Verified answer
    crousseau Profile Picture
    33 on at

    Good day everyone!

     

    It looks like it can be done with the nesting conditions, which now is up to eight. Plus, we changed the requirements to have multiple files in a folder. So, we are using "or" conditions for those. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard