How to Save Power Automate OneDrive Files to a Local Drive
Question details
The user needs to copy renamed Outlook invoice attachments from OneDrive to a local desktop Z folder using a Power Automate flow.

- Product
- Microsoft Power Automate
- Device & OS
- not provided
- Scenario
- Automating the transfer of invoice attachments from cloud storage (OneDrive) directly to a local file system directory.
- Observed behavior
- The user initially wants to bypass the on-premises data gateway, but the local file-system destination requires the gateway and specific folder permission configurations.
Ensure you have administrator rights on the desktop computer where the files will be saved, and verify that the target Z drive is mapped, accessible, and connected to your network.
Install and Configure the On-Premises Data Gateway
To write files from the cloud to a local drive, you must install Microsoft's on-premises data gateway and properly configure the File System connector.
Power Automate operates in the cloud and cannot directly access local network paths. The on-premises data gateway acts as a secure bridge, allowing cloud flows to interact with your local file system.
Download and install the standard on-premises data gateway on your desktop computer, signing in with your Power Automate account.
During the gateway setup or connection creation, specify the permitted root folder path that encompasses your target Z drive to ensure the service has access.
In your Power Automate flow, add a 'Create file' action using the File System connector, and select the gateway connection you just registered.
Set the destination folder path to your local Z drive directory and map the file name and file content dynamically from your OneDrive or Outlook trigger.

Manage Your Invoices and Documents Seamlessly with WPS Office
While Power Automate handles automated file routing to your local drive, WPS Office provides a lightweight, highly compatible suite to open, edit, and organize those saved Outlook invoices and spreadsheets right on your desktop.
- 1. Download the Installer: Visit the official WPS website and download the free WPS Office desktop installer.
- 2. Complete Installation: Run the downloaded file and follow the simple on-screen instructions to install the suite on your computer.
- 3. Open Your Local Files: Launch WPS Office and open your newly saved invoices from the Z drive with zero formatting issues.

Frequently Asked Questions
Can I save Power Automate files to a local drive without a gateway?
No. Because Power Automate is a cloud-based service, an on-premises data gateway is strictly required to establish a secure connection to local network or desktop file systems.
Why isn't my Z drive showing up in the File System connector?
This usually happens because the gateway service account (NT SERVICE\PBIEgwService) lacks permission to access user-mapped drives. You must either grant explicit permissions to the service account or use the absolute network path (UNC path) instead of the mapped drive letter.
Can I use the personal mode gateway for the File System connector?
No, the File System connector requires the standard (enterprise) on-premises data gateway. The personal mode gateway does not support local file system writing actions.




