Power Automate – On-Premises gateway – Copying file from SharePoint document library folder to Local PC folder \ network-drive folder

Hi All,
Greetings for the day 🙂 LIFE IS BEAUTIFUL 🙂
Recently I received a request – “To copy .CSV file from SharePoint document library to local folder” from one of the user in my organization
So for me best suitable approach is Power Automate 🙂 Since this is first time I am working for local PC \ Network drive started digging into the details
To use local PC / Network Drive / Shared folder we need to use On-premises data gateway
What is On-premises data gateway :
- The on-premises data gateway is bridge between on-premises data and cloud services like Power Automate, Power BI, Power Apps, Azure Logic Apps
- The on-premises data gateways are used when we need to transfer data between on-premises and cloud services like SharePoint online
- Scenarios :
- We need to upload file from local folder to SharePoint document library
- We need to download file from SharePoint online list folder to local folder / network drive

Installing On-premises data gateway on local computer :
- To transfer files in between on-premises and cloud services (eg – SharePoint) we need to install and configure on-premises data gateway on local computer
- Download the On-premises data gateway from – https://go.microsoft.com/fwlink/?LinkId=2116849&clcid=0x409
- On successful installation sign in with Microsoft 365 account as
- Configuring On-premises data gateway
Power Automate :
- Once On-premises data gateway is installed successfully next step is to create Power Automate
- Lets create Power automate – named “Copy files from SharePoint to your PC” as shown in below fig
- We will have a SharePoint trigger – “When a file is created in a folder“

- As we add “When a file is created in a folder” we need to select our SharePoint online site and document library from where we need to download the document

- Complete trigger looks like as follows in following fig

- Next, we will use action called – “Create file” – here we create connection to file system and selecting the folder where we need to download the respective file from the respective selected document library
- “Create file” action requires us to create a connection with file system
- Once connection with file system is created successfully, it looks like as
- Once successful connection is created successfully, we are ready to select the folder from local file system as

- Complete Power automate looks like as below in fig :
- We could see the Gateways from Data >> Gateways as shown in below fig
- Connection details – “File system” connection details – Data >> Connections

- Test the flow
- Upload the document in document library which is selected in trigger – “When a file is created in a folder“
- On successful execution, we will have document in respective folder selected in action – “Create file“
Thanks for reading 🙂 ENJOY BEAUTIFUL LIFE 🙂
You must be logged in to post a comment.