web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Scheduled SFTP flow to...
Power Automate
Answered

Scheduled SFTP flow to OneDrive

(1) ShareShare
ReportReport
Posted on by 15

I'm fairly new to Flows and have run into a roadblock. I'm trying to copy a set of files on a schedule from a sFTP server to a OneDrive folder. Every night there is a job that uploads a set of .zip files to a sftp folder and I'm trying to run this flow sometime after that to grab those zip files by a string match on the first part of the file names. When i check the output of the List files in Folder i see the files listed by name and displayname and am not sure why the condition is returning an error not finding the string. 

 

 

Flow Error2.JPG

 

Flow Error.JPG

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @maineis4lovers ,

     

    From the screenshot, it seem that you are using a contains function in the right hand of the Condition. What is the function?

     

    If you want to check if the file name contains certain words, please try with the following configuration. I am using OneDrive for Business though.

    1.PNG 

     

    Best regards,

    Mabel

     

  • maineis4lovers Profile Picture
    15 on at

    Hi @v-yamao-msft ,

    Here is the fuction

     

    contains(triggerBody()?['{FilenameWithExtension}'],'idn_kpi')
     
    I've tried using  Name and DisplayName contains as well, still get the same error. flow conditional.JPG
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @maineis4lovers ,

     

    I am afraid that .zip will be considered as Folder but not File. While the Condition is going to check File which Name contains “idn_kpi”.

     

    Could you test with a single file to see if the Condition will work?

     

    Further, function contains will return True or False, if you want to check if the file name contains specific words, just use dynamic content Name or DisplayName in the right hand Value field of the Condition.

     

    Best regards,

    Mabel

     

  • maineis4lovers Profile Picture
    15 on at

    Mabel,

    I'm able to get the flow to work with single file. Is there any way to configure this to trigger on the archive folder or will i need to find a way to unarchive the zip file before the flow will trigger the move to the onedrive folder?

     

    Thanks

  • Verified answer
    maineis4lovers Profile Picture
    15 on at

    Mabel,

    It appears to be working now. I wasnt able to get the conditional statement to work, however, i created a new folder within the sftp server and pointed the flow to run against that using whenever a file is added or modified. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 922

#2
Valantis Profile Picture

Valantis 837

#3
Haque Profile Picture

Haque 534

Last 30 days Overall leaderboard