Connect to on-premises file systems with Azure Logic Apps
With the File System connector and Azure Logic Apps, you can create automated tasks and workflows that create and manage files on an on-premises file share, for example:
- Create, get, append, update, and delete files.
- List files in folders or root folders.
- Get file content and metadata.
This article shows how you can connect to an on-premises file system as described by this example scenario: copy a file that's uploaded to Dropbox to a file share, and then send an email. To securely connect and access on-premises systems, logic apps use the on-premises data gateway. If you're new to logic apps, review What is Azure Logic Apps?
To follow the example, you need these items:
An Azure subscription. If you don't have an Azure subscription, sign up for a free Azure account.
Before you can connect logic apps to on-premises systems such as your file system server, you need to install and set up an on-premises data gateway. That way, you can specify to use your gateway installation when you create the file system connection from your logic app.
A Dropbox account, which you can sign up for free. Your account credentials are necessary for creating a connection between your logic app and your Dropbox account.
Access to the computer that has the file system you want to use. For example, if you install the data gateway on the same computer as your file system, you need the account credentials for that computer.
An email account from a provider that's supported by Logic Apps, such as Office 365 Outlook, Outlook.com, or Gmail. For other providers, review the connectors list here. This logic app uses an Office 365 Outlook account. If you use another email account, the overall steps are the same, but your UI might slightly differ.
Basic knowledge about how to create logic apps. For this example, you need a blank logic app.
Before your logic app can access any service, you must create a connection between your logic app and that service. If you didn't previously create this connection, you're prompted for connection information when you add a trigger or action for that service to your logic app. The Logic Apps Designer provides an easy way for you to create this connection directly from your logic app.
Sign in to the Azure portal, and open your logic app in Logic App Designer, if not open already.
In the search box, enter "dropbox" as your filter. From the triggers list, select this trigger: When a file is created
Sign in with your Dropbox account credentials, and authorize access to your Dropbox data for Azure Logic Apps.
Provide the required information for your trigger.
Under the trigger, choose Next step. In the search box, enter "file system" as your filter. From the actions list, select this action: Create file - File System
If you don't already have a connection to your file system, you're prompted to create a connection.
Property Required Value Description Connection Name Yes <connection-name> The name you want for your connection Root folder Yes <root-folder-name> The root folder for your file system, for example, if you installed your on-premises data gateway such as a local folder on the computer where the on-premises data gateway is installed, or the folder for a network share that the computer can access.
The root folder is the main parent folder, which is used for relative paths for all file-related actions.
Authentication Type No <auth-type> The type of authentication that your file system uses, for example, Windows Username Yes <domain>\<username> The username for the computer where you have your file system Password Yes <your-password> The password for the computer where you have your file system gateway Yes <installed-gateway-name> The name for your previously installed gateway
When you're done, choose Create.
Logic Apps configures and tests your connection, making sure that the connection works properly. If the connection is set up correctly, options appear for the action that you previously selected.
In the Create file action, provide the details for copying files from Dropbox to the root folder in your on-premises file share. To add outputs from previous steps, click inside the boxes, and select from available fields when the dynamic content list appears.
Now, add an Outlook action that sends an email so the appropriate users know about the new file. Enter the recipients, title, and body of the email. For testing, you can use your own email address.
Save your logic app. Test your app by uploading a file to Dropbox.
Your logic app should copy the file to your on-premises file share, and send the recipients an email about the copied file.
For technical details about triggers, actions, and limits, which are described by the connector's OpenAPI (formerly Swagger) description, review the connector's reference page.
For questions, visit the Azure Logic Apps forum.
To help improve Azure Logic Apps and connectors, vote on or submit ideas at the Azure Logic Apps User Voice site.
Send feedback about: