In this SharePoint flow tutorial, let us see how to move files from OneDrive to SharePoint. I will also explain, how to move files from OneDrive to SharePoint using Power Automate.
And also we will learn to copy all files from SharePoint to OneDrive and from OneDrive to SharePoint.
We will also discuss how to move files from OneDrive to SharePoint using PowerShell. Let us learn:
- Move files from OneDrive to SharePoint
- Move files from OneDrive to SharePoint using flow or Power Automate
- Move files from SharePoint to OneDrive
- Power automate move file from SharePoint to OneDrive
- Copy all files from SharePoint to OneDrive using power automate
- Copy all files from Onedrive to SharePoint using power automate
Move files from onedrive to SharePoint
Now, we will learn how to move files and folders from OneDrive to the SharePoint site. When you want to share files and folders with a team of people, you can move files and folders from OneDrive to SharePoint sites.
Without writing any code or without using any 3rd party tool, we can move files from OneDrive to SharePoint by using the modern Office 365 features.
- How to allow anonymous read access to a SharePoint site?
- Grant user access to SharePoint site office 365
Follow all the steps to move files and folders from OneDrive to SharePoint site.
- Open OneDrive or you can also click on OneDrive from the Office 365 App Launcher in Office 365.
- Under My files, Select files or folders to move to the SharePoint site.
- Then, click on the More option -> Move to.
- Select a SharePoint site. Here it will display the sites that you have access to. Even you can use the Browse Sites link to browse the destination site from Office 365.
- Click on Move here. After that, your files and folder are moved from OneDrive to selected SharePoint sites. You can also create a new folder and move the files into that folder. Also, If you have other document libraries, it will display and you can select the destination library where you want to copy or move the files.
After moving files/folders from OneDrive to SharePoint sites. You will get your files/folders inside Documents in SharePoint sites.
This is how we can move files from onedrive to sharepoint and in the same way, we can copy files from onedrive to sharepoint online document libraries.
Read Power Automate SharePoint Get Items Filter Query
Move files from OneDrive to SharePoint using Power Automate
Here we will learn, moving files from OneDrive for Business to SharePoint sites using Power Automate or Microsoft flow.
Follow all the steps to move files from OneDrive to SharePoint sites
- Open Power Automate (https://flow.microsoft.com)
- Click on Template
- In the Search template, search for Move files from OneDrive for business to SharePoint site and select it.
- Under the flow will be connected to, add your id. And make sure every step should have a valid connection. Then click on continue.
- Once you click on continue, the flow page will open and the first two flows are created for you i.e when a file is created in OneDrive and create a file in SharePoint. Under when a file is created, you just put your Onedrive folder( e.g when you click on the folder icon, here you get an option for the root folder that will be the root folder of your OneDrive Business). Then under create file, choose one SharePoint site address (e.g SP learning), click one folder path where you want to store the moved file in SharePoint(e.g /Shared Documents), type one file name, and select file content from.
- Under delete file, select a file which one will delete from OneDrive and move to the SharePoint folder.
- After that, you can delete send me a mobile notification trigger and add a new trigger if you want ( e.g if you need mail when a file is moved from OneDrive to SharePoint site.).
- Click on save. Then you get a notification ‘your flow is ready to go. We recommend you to test it’.
- Click on the Test icon, here you can test your flow manually and automatically. Select manually then click on Save and test.
- Then just add a file in one Drive to make the flow work.
- Once the flow get succeed, you get a succeed status inside My flows -> All runs.
Move files from SharePoint to OneDrive
Now, let us see how to move files from SharePoint to onedrive. In the same way, we can move folders from SharePoint to OneDrive also.
Follow the steps to learn how to move Files/folders from SharePoint sites to OneDrive.
- Open your SharePoint sites.
- In Quick launch, click on Documents.
- Select files/folders you want to move. Then click on the More option in the command bar.
- Click on Move to.
- After that, select Your OneDrive.
- Then click on Move here.
After moving files/folder from SharePoint site it will visible in OneDrive. Below you can see the document is available under My files in OneDrive.
Move files from SharePoint to OneDrive using Power Automate
Here we will learn to move files from SharePoint to OneDrive using Power automate or flow. There is no template for moving files from SharePoint to OneDrive. You can follow me with the below example.
- In power automate click on Create.
- Click on Automated cloud flow.
- Type a flow name or else it will be generated automatically. Then under search trigger, search for SharePoint, under that you can see a list of triggers for SharePoint and click on when a file is created.
- Click on Create.
- Under When a file is created SharePoint, select your site address, library name, and folder.
- Then add one more action, by clicking on Next Step. Search for get file content using path action for SharePoint in the search box, click on it. Select a site address and file path. Make sure to give file path as Document library name and Filename with extension.
- To create a file in OneDrive, you can click on the next step and add one more action ( Create a file in OneDrive business). Under Create file, add folder path, file name as a file name with extension, and file content. Then click on Save.
- Click On the Test icon and select manually(also you can select automatically). Then click on Test. Add/Upload a file in SharePoint sites(which site address and folder path you have given in flow/ power automate) to run the flow. Once you upload a file the flow gets triggered and the flow gets started.
- Once your test get successful, you can see it in Run history or in My flow.
Copy all files from the SharePoint site to OneDrive using Power Automate.
Here we will learn to copy all files from the SharePoint site to OneDrive using Instant cloud flow in Power Automate.
Follow all the steps to copy all files from SharePoint to OneDrive.
- Open Power Automate. Then click on Create.
- Select instant cloud flow. Type the flow name.
- Under Choose how to trigger this flow click on Manually trigger a flow(manually triggering a flow with a flow mobile app) and then click on Create.
- Click on Next step and search get files (properties only)for SharePoint. Type the site address and library name.
- Then click on the Next step. Under All, click on the control icon. then click on Apply to each(it will loop for each file)
- Under select an output from the previous step, select value from dynamic content. Then click on, Add an action. Search for get file content using path (SharePoint) and click on it.
- Then add site address and file path to get file content.
- For creating a file in OneDrive for business, click on Add an action. Search for Create file(OneDrive business) and select it.
- Then type folder path, file name, file content, and then click on save.
- Click on the Test icon and select Manually to test manually. Then click on test.
- Run flow page will come, if you are not signed in then sign in and continue.
- After sign in, click on Run flow. Then hit Done(your flow run successfully).
Note: If you don’t have files in SharePoint then add files in SharePoint, after that you can Run the flow.
Copy all files from OneDrive to SharePoint using Power Automate
Here we will learn to copy files from OneDrive to SharePoint using instant cloud flow in power automate.
Follow all the steps to copy all files from OneDrive to SharePoint.
- Open Power automate. Then click on create.
- Click On Instant cloud flow.
- give a flow name(copy all files from OneDrive to SharePoint) and select manually trigger a flow to trigger a flow. then click on create.
- Add next step, choose list files in folders(OneDrive Business) from action.
- Add Folder(OneDrive) in List files in folders.
- Then click on the Next step to add one more flow.
- Under All, click on the Control icon.
- Then under Action, click on Apply to each.
- under Select an output from the previous step, select value from Dynamic content.
- Click on Add an action, Under Action select get file content using path.
- Then add file path(/ name(from dynamic content)).
- Click on Add an action, select Create file(SharePoint).
- Then add site address, folder path, file name, and file content from dynamic content.
- Click on Save. Then click On the test icon and select manually. Click on Test.
- Then Sign in to run the flow. Once sign-in over, then click on Continue.
- Click on Run flow. Then hit Done.
This is how we can move files from SharePoint to OneDrive and in the same way, moving files from SharePoint to OneDrive works. And also we learned how to do it using Power Automate.
After that, we learned to copy all files from SharePoint to OneDrive and OneDrive to SharePoint using Power Automate.
You may like the following flow tutorials:
- Microsoft flow examples: Save Office 365 email attachments to OneDrive for Business
- Microsoft Flow or PowerAutomate Example: Send a customized email when a new file is added
- Microsoft Flow or PowerAutomate Example: Save my email attachments to a SharePoint document library
- Convert Email to PDF using Microsoft flow or Power Automate
- Convert SharePoint list item to PDF using Flow or Power Automate
- Microsoft Flow or PowerAutomate: Trigger email based on user input
- SharePoint hub site
Bhawana Rathore is a Microsoft MVP (3 times in Office Apps & Services) and a passionate SharePoint Consultant, having around 10 years of IT experience in the industry, as well as in .Net technologies. She likes to share her technical expertise in EnjoySharePoint.com and SPGuides.com