Recently, I have been Working on Power Automate, where I got a requirement to move files from OneDrive to SharePoint online. The requirement is they want to move files at a particular time using Power Automate.
In this tutorial, I will show you how to move/copy files from OneDrive to SharePoint using Power Automate at a particular time. Also, we will see how to move only pdf files onedrive to SharePoint using Power Automate with different examples.
Copy Files from OneDrive to SharePoint using Power Automate
Let us see how to copy files from OneDrive to SharePoint using Power Automate.
Example-1: (Copy all files from OneDrive to SharePoint)
In this example, I will copy all the files that are presented in the HR Documents library in OneDrive by a flow.

In SharePoint Online, I have created a document library called HR Documents as shown below:

Here we will create a button flow, and when a user clicks on it, the files will be moved from the OneDrive HR Documents library to the SharePoint HR Documents Library.
To achieve this, follow the below steps:
Step-1:
Create an instant cloud flow, Then select ‘Manually trigger a flow‘ to trigger the flow manually.
- Then add +newstep and select the List file in Folders action from OneDrive for business action triggers.
- In the Folder, select the Source Folder path by using Show Picker.

Step-2:
- Then, we will add a Get file content action to get the content of a file. Here we will Pass the File ID from the dynamic content of the previous action i.e. list files in the folder.
- It will automatically create an apply to each control to loop through each file presented in the HR Documents OneDrive Folder.

- Add a new step and select the create file action for SharePoint. Provide the below details:
- Site Address – Choose the SharePoint site from the dropdown
- Folder Path – Select the folder from the Show Picker where you want to store the copied files (I have selected the HR Documents)
- File Name – Pass the Dynamic content value Name for the file name
- File Content – Add File content from the dynamic content value.

Step-3:
Save and run the flow by selecting the run flow option. Once flow ran successfully like below:

In the below screenshot, we can see it copies all the files from OneDrive to the SharePoint document library.

This is how to Copy all Files from OneDrive to SharePoint using Power Automate.
Example-2: (Copy file from OneDrive to SharePoint)
In this example, I am going to copy files automatically from OneDrive to SharePoint using flow.
Whenever a new file is added to the OneDrive Employee Documents automatically the created file should be copied to the SharePoint document library.
The below screenshot displays the Employee Documents folder presented in OneDrive.

Similarly, I have a SharePoint document library called Employee Documents as shown below:

Here we will create an automated cloud flow so that whenever a new file is added to the OneDrive Employee Documents library it will automatically copy the created file to the SharePoint Employee Documents Library.
To achieve this, follow the below steps:
Step-1:
Create an Automated cloud flow, and choose the trigger When a file is created, In the Folder section, from the show picker select the Employee Documents as shown below:

Step-2:
Add a new step and choose the create file action for SharePoint. Provide the below details:
- Site Address – Choose the SharePoint site from the dropdown
- Folder Path – Select the folder from the Show Picker where you want to store the copied files (I have selected the Employee Documents)
- File Name – Pass the Dynamic content value Name for the file name
- File Content – Add File content from the dynamic content value.

Step-3:
Save and run the flow by selecting the run flow option. Here I have uploaded a file called (Grady.pdf) in the OneDrive Employee Documents highlighted below:

Once the flow runs successfully like below:

Automatically, the uploaded file is copied from the OneDrive document library to the SharePoint document library.
In the below screenshot, we can see it copies the Grady.pdf from OneDrive to the SharePoint document library.

This is how to Copy Files from OneDrive to SharePoint using Power Automate.
Move Files From OneDrive to SharePoint at a Particular Time using Power Automate
Before starting the flow, you must have files in OneDrive. For this example, I created a files in OneDrive:

Also, we require a SharePoint Online document library, so I created one:

I want the Power Automate flow to trigger at a specific time, so I used a scheduled cloud flow in Power Automate. Let’s see how to create it:
1. Navigate to the Power Automate Home page, click + Create, and select the Scheduled Cloud Flow. Then provide the following information:
- Starting: Provide on which date you want to run your flow.
- at: Provide the time you want to run the flow, in my case, at 8:00 AM.
- Repeat every: We want to run the flow every weekday, so here, select 1 week.
- On these days: Select the Weekdays, i.e., Monday to Friday.

2. I need to select all files in OneDrive, so I used the List file in Folders action from OneDrive for business action, then select the Source Folder path using Show Picker.

3. Next, we need the file content, so I added the ‘Get file content‘ action from OneDrive for Business. After that, select the ID from the dynamic content. This will automatically add Apply to each action.

4. Now, inside For each action, add the Create File action for SharePoint. Provide the below details:
- Site Address – Choose the SharePoint site from the dropdown
- Folder Path – Select the folder from the Show Picker where you want to store the copied files
- File Name – Pass the Dynamic content value Name for the file name
- File Content – Add File content from the dynamic content value.

5. Finally, add a delete file action for OneDrive to delete the file from OneDrive. Then, select the ID from the dynamic content.

Now, we need to run the flow.
Run the Flow to Move Files From OneDrive to SharePoint at a Particular Time
Now, it’s time to save the flow. Click on Test -> Select Manually -> click Test.

After the flow runs successfully, go to the SharePoint library, and you will see all the files successfully moved.

Also, you can see that the OneDrive files were deleted.

Here, I am required to move, so I used the delete file action last. If your requirement is a copy, do not use that action.
Move Only PDF Files from Onedrive to SharePoint Using Power Automate
In this example, I will explain how to move a specific category of files, such as PDF, Excel, JPG, etc., using the same flow mentioned above.
Now, I have uploaded some files to OneDrive again. Check the screenshot below:

Also, I deleted all files in the SharePoint library:

Now edit the above flow and add a condition action after the List files in folder action.

Then open the Condition action Parameters and select the Name (from list files in folder action) value ends with .pdf.

After that, save the flow. Add the Get file content action in the true section and select the ID from the dynamic content.

Then, add a create file action for SharePoint. Provide the below details:
- Site Address – Choose the SharePoint site from the dropdown
- Folder Path – Select the folder from the Show Picker where you want to store the copied files
- File Name – Pass the Dynamic content value Name for the file name
- File Content – Add File content from the dynamic content value.

After that, add the delete file action for OneDrive. Then, select the ID from the dynamic content.

Then, delete the ‘For each’ action shown below. Next, save the flow, and we can proceed to run it.
Run the Flow to Move Only PDF Files Onedrive to SharePoint
Now, it’s time to save the flow. Click on Test -> Select Manually -> click Test. After the flow runs successfully, go to the SharePoint library, and you will see only the PDF file moved, not the other file.

Also, when you go to OneDrive, you can see only deleted PDF files and other files that are still present.

In this example, I only show how to move PDF files from OneDrive to SharePoint using Power Automate. You can move any file from OneDrive to SharePoint. You only need to change the condition here, like I gave .pdf, but you can give it as per your requirement.
Conclusion
I hope you get an idea of copying files from OneDrive to SharePoint using Power Automate.
Here I have shown you two different examples of copying files from OneDrive to SharePoint. In the first example, I showed you how to copy all the files from OneDrive to SharePoint in Power Automate.
In the second example, I showed you how to copy files from OneDrive to SharePoint whenever a new file is added to the OneDrive documents library using Power Automate.
You may also like:
- How to Stop Flow in Power Automate?
- How to Change Trigger in Power Automate
- How to Extract Numbers from Email Subjects in Power Automate?
- Get Distinct Values from SharePoint List using Power Automate
- Save SharePoint List Attachments to a SharePoint Library Using Power Automate

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.