How to Connect Power Automate to SFTP
The connection process in this post is reusable anywhere Power Automate needs to exchange files with an SFTP server. The same SFTP-SSH connection can support flows that list folders, retrieve files, create files, or respond to file activity alongside other Power Automate connectors and business systems.
Connect Power Automate to SFTP for automated SFTP workflows
This guide covers the shared setup: connecting Power Automate to SFTP To Go through the SFTP-SSH connector and confirming that the connection works.
By the end of this guide, you’ll have a tested SFTP To Go connection in Power Automate that your flows can use to list, retrieve, and create files over SFTP.
If you’re setting up this SFTP-SSH connection for use with SharePoint, the connection itself is only the starting point. After this article, continue with SharePoint to SFTP Sync or SFTP to SharePoint Sync, depending on which way the files need to move.
What you need before connecting Power Automate to SFTP
Have these details ready before you open the flow designer:
- Access to the Power Automate environment you’ll use for the workflow
- The
SFTP-SSHconnector in that environment - An active SFTP To Go account
- The host, username, password, and port shown in the SFTP To Go
Credentialstab - An SFTP To Go credential that can list the folder you’ll use for the connection test
- A decision on whether the connection will use password or SSH-key authentication
The tested walkthrough uses password authentication on port 22. If your organization requires an SSH key or a pinned host-key fingerprint, use the approved values for that credential instead of copying the tested fields blindly.
Connect Power Automate to SFTP To Go
Create a small manual flow first. Listing an SFTP folder is a cleaner connection test than building the complete automation and then trying to work out whether a failure came from the trigger, the file mapping, or the SFTP credentials.
Step 1: Create an SFTP connection test flow
- Log in to Power Automate.
- Select
Create. - Select
Instant cloud flow.
4. Name the flow SFTP To Go connection test.
5. Choose Manually trigger a flow and select Create.
6. Add a new action and search for SFTP .
7. Select SFTP - SSH, not the older SFTP connector.
8. Choose List files in folder.
Step 2: Enter the SFTP To Go connection details
When the connection panel opens, enter the values for the SFTP To Go credential you want Power Automate to use:
Display name: a clear label such asSFTP To GoorS2G.Host server address: the host shown underCredentialsin SFTP To Go.User name: the SFTP To Go username.Password: the password for that credential when you’re using password authentication.Port number:22.SSH private key and passphrase: leave these blank for the tested password-based connection.SSH host key fingerprint: Get the fingerprint for the host by following these instructions.Root folder path: set this to/. This path is relative to the SFTP To Go credential’s home folder, so/starts the connection at that credential’s home folder. Any folder paths used later in the flow are resolved from there.
Select Create once the fields are complete.
Step 3: Test the SFTP-SSH connection
- In
List files in folder, setFolderto/. - Select
Save. - Select
Test, chooseManually, and run the flow. - Open the completed run and expand the
List files in folderaction. - Confirm that Power Automate returns the folders and files visible to the SFTP To Go credential.
Don’t move on to the automation workflow until this test succeeds. A working folder listing confirms that Power Automate can authenticate, reach the endpoint, and resolve the connection root.
Fix common Power Automate SFTP connection problems
If the test flow fails, check the connection itself before changing anything in later steps in your automation workflow.
- Authentication fails: recheck the host, username, password, port, and authentication method against the SFTP To Go
Credentialstab. - Bad Gateway appears: in the tested setup, this usually pointed to incomplete or mismatched authentication fields. Remove unused SSH-key values when you’re using a password, then test again.
- The wrong folders appear: review the root folder path and the home-directory restrictions applied to the selected SFTP To Go credential.
List files in folderfails: confirm that the credential has permission to view the folder you entered. The later create-file and get-file actions won’t work reliably until the listing test does.
Choose how to use the SFTP connection
Once the SFTP connection is working, you can use it in any Power Automate flow that needs to list, retrieve, or create files in SFTP To Go. The rest of the workflow depends on the other system involved and whether files are moving into or out of SFTP.
You only need separate inbound and outbound flows when files genuinely move in both directions.
Use the connection with SharePoint
If SharePoint is part of the process, continue with the guide that matches where the file starts.
- Use SharePoint to SFTP Sync when files are prepared or approved in SharePoint and need to be copied to SFTP To Go. It covers the SharePoint trigger, file retrieval, file naming, SFTP destination, testing, and common errors.
- Use SFTP to SharePoint Sync when files arrive through SFTP To Go and need to be copied into a SharePoint document library. It covers the webhook, file path, file retrieval, SharePoint file creation, testing, and common errors.
What this connection setup does not do
Connecting Power Automate to SFTP To Go gives the flow access to the SFTP endpoint, but it doesn’t set up the full file process on its own. You still need to define what starts the flow, which folders it uses, how files are handled, what happens when a file already exists, and how failures are checked.
Those details are covered in our two SharePoint guides so this article can stay focused on creating and testing the shared SFTP-SSH connection.
Frequently asked questions
Yes. Use Microsoft’s `SFTP-SSH` connector with the host, username, authentication details, and port assigned to your SFTP To Go credential.
Which Power Automate SFTP connector should I use?Use `SFTP-SSH` for the workflows covered here. It provides actions for listing folders, retrieving file content, creating files, and carrying out other SFTP file operations.
Where do I find the SFTP To Go connection details?Open the SFTP To Go `Credentials` tab and use the host, username, password or SSH key, and port assigned to the credential that will run the workflow.
How do I test the Power Automate SFTP connection?Create a manual test flow with `SFTP-SSH` and `List files in folder`, run it against `/`, and confirm that Power Automate returns the folders and files visible to the credential.
Does connecting Power Automate to SFTP create a complete automation?No. The connection gives Power Automate access to the SFTP endpoint, but you still need to configure what starts the flow, which folders it uses, which file actions it performs, and how failed runs or duplicate files are handled.
Can multiple Power Automate flows use the same SFTP connection?Yes, provided the SFTP To Go credential has the permissions each flow needs. Separate credentials can give you clearer access controls when different flows use different folders or require different file permissions.