cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
maineis4lovers
Level: Powered On

Scheduled SFTP flow to OneDrive

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

1 ACCEPTED SOLUTION

Accepted Solutions
maineis4lovers
Level: Powered On

Re: Scheduled SFTP flow to OneDrive

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. 

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: Scheduled SFTP flow to OneDrive

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

 

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.
maineis4lovers
Level: Powered On

Re: Scheduled SFTP flow to OneDrive

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
Community Support Team
Community Support Team

Re: Scheduled SFTP flow to OneDrive

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

 

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.
maineis4lovers
Level: Powered On

Re: Scheduled SFTP flow to OneDrive

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

maineis4lovers
Level: Powered On

Re: Scheduled SFTP flow to OneDrive

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. 

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

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

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

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 (2,937)