Unable to upload file to SFTP root folder using logic apps SFTP-SSH Connector
Hi There,
I am using Logic Apps consumption and created a workflow to move the file from Sharepoint to SFTP Root folder.
But whenever I am executing the workflow getting an error message as "The provider path "/<File Name> doesn't exist.".
Any help will be appreciated.
Thanks
Jagjeet
Azure Logic Apps
-
Shireesha Eeraboina • 1,635 Reputation points • Microsoft Vendor
2025-01-31T05:55:09.6866667+00:00 Hi @Jagjeet Singh ,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
It looks like you're encountering an issue when trying to upload a file to the SFTP root folder using Logic Apps. The error message "The provider path '/<File Name>' doesn't exist" typically indicates that the specified path is incorrect or that the file is not being found.
- Ensure that you are using the correct path for the SFTP root folder. The root folder is usually represented by a single forward slash (
/
). If you want to upload directly to the root, your path should look like this:/<File Name>
- Make sure that the file name you are trying to upload is correct and does not contain any invalid characters. Also, ensure that the file exists in the SharePoint location you are referencing.
- In your Logic App, ensure you are using the "SFTP - Create file" action to upload the file. In the "File Path" field, enter the path as
/yourfilename.ext
. - As a troubleshooting step, try uploading a simple text file with a straightforward name (e.g.,
test.txt
) to see if the issue persists. This can help determine if the problem is with the file name or path. - Ensure that the SFTP account you are using has the necessary permissions to write to the root folder.
For your reference, please review the following documentation for further clarification:
- Connect to an SFTP file server from workflows in Azure Logic Apps
- SFTP-SSH managed connector reference - Troubleshooting
If you find the answer helpful, kindly click "Accept Answer" and upvote it. If you have any further questions or concerns, please feel free to reach out to us. We are happy to assist you.
- Ensure that you are using the correct path for the SFTP root folder. The root folder is usually represented by a single forward slash (
-
Shireesha Eeraboina • 1,635 Reputation points • Microsoft Vendor
2025-02-03T01:06:41.8666667+00:00 Hi @Jagjeet Singh ,
Just checking in to see if the information above was helpful. If you have any further updates on this issue, please feel free to post them here.
-
Jagjeet Singh • 0 Reputation points
2025-02-03T03:46:41.8233333+00:00 Hi Shireesha,
Yes my root folder is "/" my file name is very simple with no special characters. as you can see in the screenshot.
I am using create file action of sFTP connector.
I am able to write file on to sFTP using Filezilla and winzip.
Thanks
Jagjeet
-
Shireesha Eeraboina • 1,635 Reputation points • Microsoft Vendor
2025-02-03T04:52:17.46+00:00 Hi @Jagjeet Singh ,
I am a bit confused about whether the issue has been resolved or if it still persists. If the issue persists, could you please share the error details so we can assist you further?
Thank you for your patience and understanding.
-
Jagjeet Singh • 0 Reputation points
2025-02-03T11:11:27.4566667+00:00 Hi @Shireesha Eeraboina The issue is not resolved yet. I am still getting the error message in logic apps. The issue here is my file gets uploaded to sftp server but it get removed by source system as soon as it's been written. By the time logic apps goes back to check the file status it's already been removed and It throws an error message as provided path doesn't exist.
-
Jagjeet Singh • 0 Reputation points
2025-02-03T11:12:11.0633333+00:00 even I have metadata flag turned off.
-
Shireesha Eeraboina • 1,635 Reputation points • Microsoft Vendor
2025-02-04T07:11:39.21+00:00 Hi @Jagjeet Singh ,
Thank you for the additional details, it sounds like the issue arises because the file is being removed from the source system immediately after being uploaded to the SFTP server. This can lead to the error message you're seeing in Logic Apps, as it tries to access the file after it has already been deleted.
Here are a few suggestions to help resolve this issue:
- Consider adding a delay in your Logic App workflow after the file upload action. This will give the source system some time to complete its operations before Logic Apps checks for the file. You can use the "Delay" action to pause the workflow for a few seconds.
- If possible, instead of relying on the file's existence after upload, consider using a different trigger that can better handle the timing of the file's availability. For example, you could trigger the Logic App based on a specific event or a scheduled time.
- Before attempting to access the file, you can add a condition to check if the file exists on the SFTP server. This way, if the file has been removed, the workflow can handle it gracefully without throwing an error.
- If you have control over the source system, check if there’s a way to prevent the file from being deleted immediately after upload. This could help ensure that Logic Apps has enough time to process the file.
I hope this helps! Let me know if you have any further questions or need additional assistance.
-
Shireesha Eeraboina • 1,635 Reputation points • Microsoft Vendor
2025-02-05T05:28:12.79+00:00 Hi @Jagjeet Singh ,
If you find the answer helpful, kindly click "Accept Answer" and upvote it. If you have any further questions or concerns, please feel free to reach out to us. We are happy to assist you.
-
Shireesha Eeraboina • 1,635 Reputation points • Microsoft Vendor
2025-02-07T04:09:30.84+00:00 Hi @Jagjeet Singh ,
If you found the response helpful, please click Accept Answer and Yes for the provided answer. This will help other community members with similar issues find the solution more easily.
-
Jagjeet Singh • 0 Reputation points
2025-02-13T00:14:27.42+00:00 Thanks for your help, sorry got busy with other tasks.
To answer your response.
- Can't put delay on logic apps as it is part of create file trigger.
- Can't do this as well as it relates to step 1.
- File will never exist at target as it has unique name.
- Can't control this at target as its bank SFTP site.
I also noticed that although the file is getting created at target bank SFTP server but logic apps still shows the error message as 404.
Sign in to comment