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 Platform Community / Forums / Power Automate / Copy SharePoint List a...
Power Automate
Unanswered

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:
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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard