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

Community site session details

Session Id :
Power Automate - Building Flows
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? 

I have the same question (0)
  • Verified answer
    crousseau Profile Picture
    33 on at
    Re: Copy SharePoint List attachments to SharePoint documents based on specific filenames

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard