Showing results for 
Search instead for 
Did you mean: 
New Member

A reference was made to a file or folder which does not exist

Hi Experts,

I'm using an MS Flow to connect with sftp and create a file within a specified folder when a record is created within Dynamics. This record that will be created within Dynamics has a multiple line of text field which carries an XML body which is used to create file within sftp folder. Looks like everything is working, except for this error message which says the folder doesn't exist, the folder is available (I selected the folder path manually instead of typing the path). Also, the user account used to connect with sftp has complete access to that folder. Any help will be appreciated




"status": 404,
"message": "A reference was made to a file or folder which does not exist.\r\nclientRequestId: 2c52cef6-953b-4b3e-8dd1-d151ff730d0c",
"source": ""
Community Support
Community Support

Re: A reference was made to a file or folder which does not exist

Hi @RaviMuthyala,


How do you connect to SFTP Server?

If you are using WinSCP to connect to the SFTP Server from your local network, I assume that IP is already whitelisted for the port 22.

When connecting from flow to your SFTP Server, please make sure the corresponding IP address is whitelisted for 22. Maybe flow is not able to reach the server on 22 port.

Hope this could be a reference for you.


Best regards,



Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
New Member

Re: A reference was made to a file or folder which does not exist

Did you ever figure this out?

Helpful resources


New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!


Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,684)