Microsoft Flow Example: Copy Files from SharePoint to PC

In this Microsoft Flow tutorial, we will discuss how we can use “Copy Files from SharePoint to PC” Microsoft Flow Template in SharePoint Online Office 365. By using this Microsoft Template, You can copy any files from SharePoint Online List/Document Library to your PC.

In my last post I have shown Microsoft Flow Example: Copy new files from your PC to SharePoint Online Document Libray.

If you are new to Microsoft Flow, then read a detailed article on Microsoft Flow:

Microsoft Flow on “Copy Files from SharePoint to PC”

To get Microsoft Flow in SharePoint Online Office 365, 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 (Lifetime Access)

Copy Files from SharePoint to PC

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

Copy files from SharePoint to your PC in microsoft flow
Copy files from SharePoint to your PC in microsoft flow

In this template, you can see there is an action present (By default) which name as: “When a file is created“. This action is having two mandatory fields as:

  • Site Address: Enter your Site Address URL where you will add/upload the file.
  • Folder Id: Specify your folder Id where you want to create/add a file. You can also specify your folder Id from the folder box.
Copy files from SharePoint to your PC microsoft flow
Copy files from SharePoint to your PC microsoft flow

You can create another action by clicking on “+” symbol or by using “+New step“. Add an action “Create file” (By default, this action will be present in that template).

At first, To copy a file from SharePoint Online List/Library to your PC, 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.

Microsoft flow copy files from SharePoint to your PC
Microsoft flow copy files from SharePoint to your PC

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 the file will save.
  • 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.

flow copy new files from sharepoint to your your pc
flow copy new files from sharepoint to your your pc

This “Create file” action is having three different types of mandatory fields as:

  • Folder path: Specify the path of your folder where the file will save.
  • Filename: Enter the file name from the dynamic content as “File name“. Also, you can enter the file name by using your custom value.
  • File Content: Enter the file content from the dynamic content as “File Content“. Also, you can enter the file content by using your custom value.
Flow copy new file from sharepoint to your your pc
Flow copy new file from sharepoint to your your pc

Here you can see the full structure of Microsoft flow template (Copy files from SharePoint to your PC). 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.

copy files from sharepoint to your pc in flow
copy files from sharepoint to your pc in flow

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

copy files from sharepoint to your pc in microsoft flow
copy files from sharepoint to your pc in microsoft flow

To test the flow, it will ask you to add the files in your specific location. As in this example, I have specified the path as: “Masterdoclibrary/Forms/Document“. So I have uploaded a file in that Document library which you can see as shown in below figure.

copy files from sharepoint to pc microsoft flow
copy files from sharepoint to pc microsoft flow

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

Copy files from sharepoint to your pc in flow
Copy files from sharepoint to your pc in flow

Now go to your specified PC Folder path 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 PC Folder path as “G:/SharePointDocument”, So the new file is copied from specified SharePoint Document Library (“Masterdoclibrary/Forms/Document“) to this PC Folder path which you can see in the below figure.

microsoft flow copy files from SharePoint to PC
microsoft flow copy files from SharePoint to PC

You may like following SharePoint tutorials:

Hence, In this Microsoft Flow tutorial, We discussed a Microsoft Flow demo on Copy Files from SharePoint to PC using Microsoft Flow template in SharePoint Online Office 365. Hope this will be helpful.

>