Using Azure Automation With Logic Apps For SFTP Transfers
Description:
One of the cool ways to use Azure Automation Hybrid Workers is to schedule them to do SFTP transfers. Here is how:
To Resolve:
-
Follow the steps in Moving To Azure Automation to create an Azure Automation account linked to Github.
- Ensure an Azure Files share is mounted as the service account user
- Ensure that each of your hybrid workers have a static public IP
- Also make sure all third party vendors that you want to SFTP files to have this IP whitelisted as many will require this.
-
Next, create a Logic App with a recurrence trigger that starts the action Create Job
-
Lastly, just create a
.ps1
file in the/runbooks
directory of your Azure Automation repo that:- Grabs a file from the mounted drive
- Copies it to the Hybrid Worker’s local C drive to a temp folder
- Uses the WinSCP dll to transfer the file to a third party
- Example
Comments