Skip to main content

Notifications

Community site session details

Community site session details

Session Id : nt2eOQ0z6eZsyuDM7diCHk
Power Automate - Using Flows
Unanswered

Upload a file to SFTP

Like (0) ShareShare
ReportReport
Posted on 19 Apr 2018 11:21:00 by 8

Hi,

 

I have troubles uploading a file to SFTP.

 

I get the error 404:

"status": 404,
"message": "A reference was made to a file or folder which does not exist.\r\nclientRequestId: c7af30db-fc0f-4377-a571-36478e29e581",
"source": "sftpconnectionprovider-westeurope.am2-ase-001.p.azurewebsites.net"


I tried to copy, to create and nothing, always the same error. The name of the file is correct, the source path and the destination path.

Any help?

 

Sin tĂ­tulo.jpg

Thanks,

  • camcotech Profile Picture
    6 on 03 Jun 2020 at 13:15:04
    Re: Upload a file to SFTP

    @olgaoszcz 

    This was the exact same scenario in my case as well. 

    My client NEVER made this disclosed this information to me, until I spent days of trial and error and video demonstration. They claimed it was for security purposes... Let's just say, there is zero justification for the type of business they were to have a policy such as this.

    Thank you for your input.

  • olgaoszcz Profile Picture
    66 on 03 Jun 2020 at 08:08:24
    Re: Upload a file to SFTP

    @camcotech 

    In my case it turned out that the SFTP server (which wasn't 'mine') was deleting every file after it has been downloaded. Apparently when 'When file is added or modified' is triggered, the fie is being downloaded so when the Flow tried to run 'Get file metadata using path' the file wasn't there anymore. Don't know if it helps, it is a very specific scenario.

  • camcotech Profile Picture
    6 on 22 Mar 2020 at 17:15:21
    Re: Upload a file to SFTP

    @olgaoszcz 

    Im facing the same issue for WEEKS and I still cannot figure it out. Any change you resolved the issue whening using the trigger 'When file is added or modified'?

    any help would be greatly appricated.

    thank you

     

    - john

  • olgaoszcz Profile Picture
    66 on 15 May 2019 at 06:13:07
    Re: Upload a file to SFTP

    I get the same error while trying to get the matadata. I'm doing: 'When file is added or modified' -> 'Get file metadata using path'. The path I'm using is the dynamic content from the trigger so I'm completely sure it's correct. Any ideaswhat can cause it?

  • MortenT Profile Picture
    29 on 21 Oct 2018 at 22:45:41
    Re: Upload a file to SFTP

    Hi 

     

    Just a note for you. I was also having trouble uploading a file (not creating) for SFTP. Got the same error message as you did.

    Instead of using copy file, use update file - that works.

     

    /Morten

  • jalonso80 Profile Picture
    8 on 20 Apr 2018 at 10:21:56
    Re: Upload a file to SFTP

    Thanks Kris,

     

    I tried and i get the same result.

     

    Sin tĂ­tulo.jpg

     

    I cannot undertsand it.

     

    Regards,

    Javier

  • v-xida-msft Profile Picture
    on 20 Apr 2018 at 07:37:12
    Re: Upload a file to SFTP

    Hi @jalonso80,

     

    If you want to copy a file from your SharePoint library to your SFTP server folder, I think the "Copy file" action could not achieve your needs. If the file has not been existed in your SFTP Server folder, you could not specify it within the Source file path field of the "Copy file" action of SFTP connector.

     

    Please take a try to change the "Copy file" action into the "Create file" action. I have made a test on my side and please take a try with the following workaround:

    24.JPG

     

    Within "Create file" action of SFTP Connector, specify Folder path, File name field set to File name dynamic content of the trigger, File content field set to File Content dynamic content of the trigger.

     

    Best regards,

    Kris

     

     

  • jalonso80 Profile Picture
    8 on 20 Apr 2018 at 07:24:00
    Re: Upload a file to SFTP

    Hi Kris,

     

    Thanks for your reply.

     

    When you asked me to "check if the file that you specified within the Source file path field of "Copy file" action is existed in your SFTP Server folder", i have to say that the file is created in my SharePoint and then i want to copy or upload it to the specified destination path in the SFTP folder, so it is is a new file that dosen't exists in the SFTP until i upload it.

     

    This explains a little bit?

     

    Regards,

    Javier

     

  • v-xida-msft Profile Picture
    on 20 Apr 2018 at 06:24:39
    Re: Upload a file to SFTP

    Hi @jalonso80,

     

    Do you want to copy a file from your SharePoint library to your SFTP Server folder?

     

    The error message told that the file that you specified within Source file path field of the "Copy file" action could not be found within your SFTP server folder.

     

    The Source file path field of the "Copy file" action of SFTP Connector is required to fill the path of a file within your SFTP Server, the Destination file path field is required to fill a Path to the destination file within your SFTP Server, including file name.

     

    Please check if you have filled proper file path of your SFTP server within the Source file path field of the "Copy file" action. In addition, please check if the file that you specified within the Source file path field of "Copy file" action is existed in your SFTP Server folder. 

     

    Also please take a try to re-create your flow and then check if the issue is solved.

     

    More details about the Copy file action of SFTP Connector, please check the following article:

    Copy file action

     

    Best regards,

    Kris

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,077 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow