Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

502 Bad Gateway error on SFTP - SSH Flow

I get a 502 Bad Gateway error message on a flow that ran without error weeks ago. The zip file is just over 30 MB now, and if I switch it to around 10 MB, the flow works. I am confused because the flow ran successfully earlier this month on files around 30 MB.


The flow gets a file from an sFTP server and creates a copy on my OneDrive. 






The file extension in your "get file content" shows is this expected?

Try changing the file extension and also check if this bad gateway error occurs on all files (of 30 MB) or just specific files (irrespective of file size).






I have tried other files with different names and types, but the issue still persists. Both zip and csv files work if around 10 MB or less. 




Regular Visitor

This morning I tried 6 examples:

1. zip file 33 MB - Failed

2. zip file 19 MB - Failed

3. zip file 9 MB - Successful

4. csv file 34 MB - Failed

5. csv file 19 MB - Failed

6. csv file 10 MB - Successful


csv files were all named Test.csv

zip files were all named

Regular Visitor

I'm running into the same error here, did you ever find a solution?


My case is slightly different, in that I'm trying to upload a file to the SFTP server instead of download, but the result is the same. I've created a flow which triggers when a new file is added to a folder in a sharepoint library.  The flow uses the Create File action of the SFTP - SSH connector to upload the file to an SFTP server, then uses the sharepoint connector to move the file to another folder in the same library.  It's failing the Create File step, with a Bad Gateway error.  








@NeighborGeek No, still looking for a solution.

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Users online (7,246)