In this Microsoft Flow tutorial, we will discuss how we can use the “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.
To get Microsoft Flow in SharePoint Online Office 365, Sign in to your Office 365 Microsoft Account. Once it will open, click on “App launcher” and then “Flow“.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
You may like the following Microsoft Flow tutorial:
- Microsoft Flow Example : Send a customized email when a new SharePoint list item is added
- Microsoft Flow Example: When a message is posted on a group, Create a SharePoint list item
- Microsoft Flow Example: Automatically create a profile for a new candidate
- Microsoft Flow Example: Copy new files from your PC to SharePoint Online Document Libray
- Microsoft Flow Example: Email notification after approval from a SharePoint list
- Run Flows on a schedule Microsoft flow
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.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com