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 / Power Automate Flow Bu...
Power Automate
Suggested Answer

Power Automate Flow Bulk PDF Transfer from OneDrive to SPO Document Sets with Matching Condition

(1) ShareShare
ReportReport
Posted on by 2
There are many PDFs inside OneDrive Folder and many Document Sets are already created in SPO with metada. One property of Document Sets is "DocNo", which holds the PDF names without extension.
 

Logic

The goal is to automate the bulk transfer of PDF files into their respective document sets based on "DocNo" and filename matching.

 
 
Library Document Sets and OneDrive (for Business) Screen Shot:
      
  1. Iterate through all PDF files in the OneDrive folder.

  2. For each file, Compare the file name with the "DocNo" property of document sets in the SPO library.

  3. If a match is found, copy the PDF file into the corresponding document set, 

  4. If no match is found, continue checking the next document set.
Categories:
Folders and files...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • Suggested answer
    Robu1 Profile Picture
    1,487 Super User 2025 Season 2 on at
     
    Thank your for choosing Power Platform Community.
     
    To move PDF files from a OneDrive folder into SharePoint Document Sets based on filename matching with the “DocNo” metadata property.
     
    Core Logic:
    -Trigger: Use a scheduled or manual Power Automate flow.
    -List PDFs: Retrieve all .pdf files from OneDrive.
    -Extract Filename: Remove .pdf extension to get the base name.
    -Get Document Sets: Use SharePoint’s “Get files (properties only)” to fetch all Document Sets and their metadata.
    -Match Logic: Compare each filename with the “DocNo” field.
    -Copy File: If matched, use “Create file” to move the PDF into the correct Document Set folder.
    -Fallback: If no match, log or skip the file.
     
    📚 Microsoft Learn & Community Resources
    Create Power Automate Flow to copy PDF files from OneDrive to SharePoint Document Sets This Microsoft Q&A thread outlines the exact steps and expressions used to implement the logic above.
     
    🏷️ Please tag me @Robu1 if you still have any queries related to the solution or issue persists.
    ✅ Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the solution was useful in other ways.

    Happy to help 
    Robu1
    SuperUser|Moderator
    Season 2:2025
     

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

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard