In this Microsoft Flow tutorial, we will discuss how we can use “Copy new files from your PC to SharePoint” Microsoft Flow Template in SharePoint Online Office 365. By using this Microsoft Template, You can copy any files from your PC to SharePoint Online List/Document Library.
If you are new to Microsoft Flow, then read a detailed article on Microsoft Flow:
- What is Microsoft Flow [Step by Step Tutorial and Example in SharePoint Online Office 365]
- Microsoft Flow Example: Send a customized email when a new SharePoint list item is added
- Microsoft Flow Example: Copy Files from SharePoint to PC
- Microsoft Flow Example: Automatically create a profile for a new candidate
- Microsoft Flow Example: When a message is posted on a group, Create a SharePoint list item
- How to run Microsoft Flow on Schedule
Microsoft Flow copy file from pc to SharePoint Online Document Library
To create Microsoft Flow in SharePoint Online Office 365, First, Sign in your Office 365 Microsoft Account. Once it will open, Click on “App launcher” and then “Flow“.
Check Out Microsoft Flow and PowerApps Training Course Videos (Lifetime Access)

In the Microsoft Flow page, Go to “Templates” which is present in the left navigation. Search the Microsoft Flow Template name as “Copy new files from your PC to SharePoint“. Then you can get your flow template as shown below screenshot. Just click on that template.

In this template, you can see the there is an action present (By default) which name as: “When one or more files are added or modified (metadata only)“.
At first, To copy a file from your PC to SharePoint Online List/Library, You need to create a new Data gateway connection for your PC. To create a new connection, Click on “…” option and “+Add new connection” as shown in the given below screenshot.

Once you will click on “+Add new connection“, a File System action will appear where you have to enter about your PC details. This action has below fields:
- Connection Name: Provide a connection name for your PC.
- Root folder: Give your Root folder path where you will create the file.
- Authentication Type: Select the Authentication Type as “Windows” from the dropdown.
- Username: Enter the Username of your PC as like: “TSINFO\Administrator“.
- Password: Provide your PC Password.
- gateway: Select a data gateway for PC Connection. If you don’t have any data gateway connection, then install a new on-premise data gateway from the dropdown using the “Install a gateway” option.
NOTE: For On-premises data gateway installation, you may follow the below article:
Once all the field value will over, Click on “Create” as shown in below.

This “When one or more files are added or modified (metadata only)” action is having one type of field as:
- Folder (Mandatory): Specify the path of your folder where you will create the file.

Once you will finish the first action field, you can see there is another action will be present (By default) next to the “When one or more files are added or modified (metadata only)” action. The action name is: “Get file content” which is having one mandatory field as:
- File: Select “List of Files Id” from the dynamic content (By default, It was selected).

Similarly, you can see there is one another action will be present (By default) next to the ” Get file content ” action. The action name is: “Create file” which helps to create a file in the SharePoint Online List/Document Library. This action is having two mandatory fields as:
- Site Address: Enter your Site Address URL where you the file will copy from your PC.
- Folder Path: Specify your folder path where you will create/add a file.
You can also specify your folder path from the folder box. For this example, My SharePoint Online folder path is “/Shared Documents“. - File Name: Enter the name of the file from the dynamic content as “List of Files DisplayName“. Also, you can enter the file name by using your custom value.
- File Content: Enter the content of the file from the dynamic content as “File Content“. Also, you can enter the file content by using your custom value.

In this below screenshot, you can see the full structure of Microsoft flow template (Copy new files from your PC to SharePoint). Once all things will over, Click on “Save“. Now click on “Flow Checker” whether there is an error or not and if not, then “Test” the flow as shown in below figure.

To test the flow for the first time, Select the option as: “I’ll perform the trigger action” and click on “Test” as like below screenshot.

To test the flow, it will ask you to add/create the files in your specified folder path. As in this example, I have specified the folder path as “G:/SharePointDocument“. So I have created a file in that same specified folder which you can see as shown in the below figure.

Once you will create/add a file in the specified folder path, then your flow run will complete successfully and you can see a status message as like below screenshot.

Now go to your specified SharePoint Online Document Library and refresh that page. You can see that your file is copied from SharePoint Library to your PC
For this example, As I have specified my SharePoint Document Library path as “/Shared Documents”, So the new file is copied from PC to this SharePoint Online Shared Documents Library which you can see in the below figure.

You may like following SharePoint tutorials:
- [Solved] Column does not exist. it may have been deleted by another user error in SharePoint Online
- SharePoint Online Development using Patterns and Practices (PnP)
- Content Search web part in SharePoint Online
- Term update failed because of
save conflict SharePoint Online - SharePoint Online Automation: Upload Files Remotely to SharePoint Online Document Library using PowerShell
- Content query web part SharePoint Online or SharePoint 2013/2016
- The managed metadata service or connection is currently not available SharePoint online
- Error=Value=QuotaExceeded Tag=0x0121d3da SharePoint Online Office 365
- SharePoint Online Team site Vs Communication site
Hence, In this Microsoft Flow tutorial, We discussed a Microsoft Flow demo on Copy new files from your PC to SharePoint using Microsoft Flow template in SharePoint Online Office 365. Hope this will be helpful.
I am Bijay a Microsoft MVP (8 times – My MVP Profile) in SharePoint and have more than 15 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com
Is it possible to schedule flows to run at a specific time?
I have a file, which takes about 1hr to load. It is not big but takes a long time to finish. Power flow fails to upload it.
Can the file system get the files from sub folders? Can you please share the flow for that