Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Copy files from user OneDrive to SharePoint using Power Automate

Posted on July 17, 2022July 17, 2022 by Tom

“How can I take all the videos currently stored in users OneDrive and copy them to a SharePoint site using Power Automate?”


There’re two places where you can store files in the M365 platform. You can use OneDrive as a personal storage or SharePoint as a shared one. But sometimes the distinction is not that clear. Some files that should be in SharePoint are still in OneDrive of one specific user and shared to everyone else. Which is not a good approach – shared files should be in a shared location. And Power Automate can copy them for you.

Get the file from OneDrive

The standard approach would be to ‘Get file content’ and use it to create the file in SharePoint. But this action has 2 problems. Firstly, you can’t access other user’s OneDrive. And secondly, you can’t get a content of files bigger than 500 MB.

Power Automate copy onedrive sharepoint

Since this approach won’t work, you should take one step back. OneDrive is basically a SharePoint document library hidden behind a different look (same as team in Teams). That means you can use also the SharePoint actions to access OneDrive.

Use the SharePoint actions

Using the SharePoint actions ‘Copy file’ or ‘Move file’ solves these two problems. You can access files on other user’s OneDrive (only the ones that are shared with you) and you can copy even big files.

Add the ‘Copy file’ action and configure it as below.

Current Site Address

This is the address of the user’s OneDrive which you can get from the url. Open your OneDrive in a browser and copy the address until the /_layouts. It should end with the owner’s email address with replaced characters @ and . (and maybe more).

On the screenshot below it’s the OneDrive that belongs to a user dev@tomriha.com

Take the url, change the email address, and use it as the Current Site Address.

File to Copy

The second field is the path to the file you want to copy. As already said, it has a SharePoint site on the background so you can’t use just the visible folder path. You must include also the library where the file is stored. It’ll be probably ‘Documents’ library, but you can confirm again using the url. Open any folder in the OneDrive and check the url, it’ll have the library name near the end.

The screenshot below is url address to a folder called Diving.

Take the document library, combine it with the visible path leading to the file, and use it as the File To Copy.

The remaining fields

Fill the destination fields with the desired SharePoint site location and you’re done. The flow will take a file from that OneDrive and store it in a SharePoint site.

Power Automate copy onedrive sharepoint
Power Automate copy onedrive sharepoint

Summary

You should remember that OneDrive is just a SharePoint site with a different look, and the process to copy files is similar to other file copying Power Automate flows. The tricky part is that you must know the exact name of the file and on whose OneDrive it’s located. Once you have this information (and the file is shared with you) you can easily take it from there.


🚀 Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

13 thoughts on “Copy files from user OneDrive to SharePoint using Power Automate”

  1. Randy Mike says:
    October 25, 2022 at 11:39 am

    using tools like Goodsync, Sharegate or Gs Richcopy 360 make the transfer from OneDrive to SharePoint more easy and fast

    Reply
  2. Ashish says:
    June 6, 2023 at 11:49 am

    Thank you for providing this brilliant solution. Unfortunately, I am using SharePoint 2019 on-premises, which means that the “Copy file” action is not supported. I attempted to replace it with an HTTP request, but it appears to be ineffective. I would greatly appreciate any assistance you can provide in resolving this issue.

    Reply
    1. Tom says:
      August 12, 2023 at 10:42 pm

      Hello Ashish,
      I don’t work with on-premises SharePoint anymore, sorry.

      Reply
  3. Courtney says:
    July 27, 2023 at 6:17 pm

    Thanks for this, helped me solve an issue.
    In reference to another project I have I was wondering if you’ve been able to do this successfully the other way. I would like to send files from SharePoint to the OneDrive of another person. The Power Automate user has had the folder shared to them with Edit access even though they’re not the owner.
    When I try that I get the error:
    “Missing or mismatched field definition on the destination list for source field ‘Send’ type ‘Text’. Source site template id ‘TeamCollaborationSite’, target site template id ‘MySitePersonalWebTemplate’. “

    Reply
    1. Tom says:
      August 13, 2023 at 9:36 pm

      Hello Courtney,
      I never did this so no advice here.

      Reply
  4. Tobeornot says:
    February 29, 2024 at 8:48 pm

    Hi,
    I have a business OneDrive that gets a folder from a JotForm. I am trying to get the folder and its contents moved to a different SharePoint site. The flow works except for the URL for current site address. Says it doesn’t recognize it. The email strategy doesn’t work with this. Any ideas? Thank you

    Reply
    1. Tom says:
      April 17, 2024 at 10:04 pm

      Hello Tobeornot,
      I never used JotForm, so maybe it’s just a folder mapped to OneDrive that’s actually located elsewhere? If it’s on OneDrive it should work as explained.

      Reply
  5. Jeremy Gluskin says:
    September 11, 2024 at 5:44 am

    Tom,

    I am so thankful for you! This worked a treat!

    The build I’m working on transfers confidential recordings from Teams. The flow worked nicely for a few weeks, until a longer meeting hit the 500MB limit . After multiple fruitless searches and attempted workarounds, I finally found this post.

    The information you share has saved me so many hours of work in the past – I should have checked here first!

    You’re truly a credit to the community.

    Thank you,
    Jeremy

    Reply
  6. Tom Benjamin says:
    October 18, 2024 at 10:58 pm

    This sounds like the exact approach I need (copy from OneDrive personal to a SharePoint site), but when I try either Copy file or Get files (the SharePoint actions) and use the personal OneDrive URL, the flow doesn’t see any items. Seems odd because I can browse the OneDrive structure in a browser using the same account as the flow’s connection. Any suggestions?

    Thanks,
    Tom

    Reply
  7. Dávid Repka says:
    January 2, 2025 at 6:49 pm

    Hi Tom,
    thank you, it helps me a lot. Flow works fast and without errors now.

    Reply
  8. Jonathan Markey says:
    March 24, 2025 at 2:53 pm

    Hello. How would one automate this process if I had a list of URLs, in a csv or excel file, for each file that needs to be copied?

    Reply
    1. Jonathan Markey says:
      March 24, 2025 at 2:54 pm

      For reference, the URLs are collected from the data spreadsheet of an MS Form that collects the files that need to be copied.

      Reply
    2. Tom says:
      April 5, 2025 at 9:07 am

      Hello Jonathan,
      you’d load the csv / Excel in a flow, that’ll give you an array with the urls that you can loop through. Split them into site url and file name, and process them one by one.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

🚀 Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundle—everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes