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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copy files from onedri...
Power Automate
Answered

Copy files from onedrive to a sharepoint list as attachment

(0) ShareShare
ReportReport
Posted on by 13
Hi all,
 
I have files in a onedrive folder with the following setup "Pro_card_Name_LastName.pdf".
in my sharepoint list, I have a column named "agreement Name" which have the same name without the extension.
What I want to achieve here is to add the correct pdf file to the correct Sharepoint list row as attachment.
Then I'll send the file though Adobe sign for signature, and once signed I'll copy it back into my sharepoint list.
 
Thank you for your help.
 
Regards,
 
Hichem
Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi,
     
    1. List the files in Onedrive
    2. Apply to each
    Inside the Apply to each
    --that take the file name and use SubString to get the everything minus the .pdf using a Compose action and the current Item from the loop
    --Use a Get Rows sharepoint with a filter, that that column with the output of the Compose, which doesn't have the PDF, or you can add the substring IN the filter, up to you. I prefer to have it in the compose
    ----Apply to Each on Get Rows or Another Option is to use a Condition and have it check the Length of the Body/value from Get Rows to see if it equals 1, if so , in the Yes, do the attachment part, if not doing nothing in the no
    -------In the Yes Condition OR inside the Apply to each if you use that instead, it should either loop 1 or 0 times
    ---------Following one of these to either use the Add Attachment Action or the SharePoint HTTP Actions
     
     
    and done

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard