Connecting a Logic App to SFTP Gateway
Overview
This article shows you how to connect an Azure Logic App to SFTP Gateway. In this example, you will drop a file, and Azure Logic App will list the contents of the parent folder.
Configure the Logic App
First, create a Logic App resource.
In the Logic Apps Designer, click on Blank Logic App.
In the search bar, type in SFTP.
Select SFTP - SSH.
Under Triggers, select When a file is added or modified. You should see this screen:
Fill out the required fields, which are denoted with a *
character.
Also, make sure that the Network Security Group (NSG) for SFTP Gateway is allowing the Logic App ingress on port 22. You can find the IP ranges of the connectors on the Properties tab.
Since this is just a demo, you can check the box Disable SSH host key validation to avoid troubleshooting key exchange algorithms.
Next, you should see this screen:
Here, you can configure the folder and how often the folder is checked.
After you have configured everything, click +New Step. Create an action for List files in folder.
For the Folder name, use the same folder you specified in the When a file is added or modified step.
Finally, test the Logic App by dropping a file in the /Staging
folder.