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

Power Automate - On - premises data gateway
Power Automate - On - premises data gateway

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
fig : Power Automate - How on-premises data gateway works
fig : Power Automate – How on-premises data gateway works (image courtesy – Microsoft documentation)

Installing On-premises data gateway on local computer :

Power automate - installing On-premises data gateway on local computer
fig : Power automate – installing On-premises data gateway on local computer
  • On successful installation sign in with Microsoft 365 account as
Power automate - Sign in to On-premises data gateway - installed on local computer
fig : Power automate – Sign in to On-premises data gateway – installed on local computer
  • Configuring On-premises data gateway
Power automate - configuring On-premises data gateway
fig : Power automate – 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
Power automate - trigger - When a file is created in a folder
fig : Power automate – 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
Power Automate - adding trigger - "When a file is created in a folder" and selecting site and library from where we need to download document
fig : Power Automate – adding trigger – “When a file is created in a folder” and selecting site and library from where we need to download document
  • Complete trigger looks like as follows in following fig
Power Automate - SharePoint Trigger - "When a file is created in a folder"
fig : Power Automate – SharePoint Trigger – “When a file is created in a folder”
  • 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
Power automate - action "Create file" - creates the connection with File system
fig : Power automate – action “Create file” – creates the connection with File system
  • Create file” action requires us to create a connection with file system
fig : Power Automate – “Create file” action – creating connection with file system
  • Once connection with file system is created successfully, it looks like as
Power Automate - "Create file" action - connection created successfully
fig : Power Automate – “Create file” action – connection created successfully
  • 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 :
Power automate - to download the file on local file system or server
fig : Power automate – to download the file on local file system or server
  • We could see the Gateways from Data >> Gateways as shown in below fig
Power Automate - On-premises gateway - Data >> Gateways
fig : Power Automate – On-premises gateway – Data >> Gateways
  • Connection details – “File system” connection details – Data >> Connections
Power Automate - File system connection - Data >> Connections
fig : Power Automate – File system connection – 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 🙂

Prasham Sabadra

LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: