Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Copy a single file from FTP to Google Drive

(0) ShareShare
ReportReport
Posted on by 12

I need to watch a folder on an FTP server. I use the trigger and pass it on to create a file on Google drive.

Then every file that is created or changed on the folder is copied over. I don't need them and it is not compliant.

Only one file I need to watch (it is updated every 5 hours) and it is not an option to put that file in a single folder.

So, I used the Condition and put in the CASE = yes the filename that I want. Next is adding the file to the Google drive. But all the files, including the wanted file are ending up in the CASE = no box. 

Any suggestions? 

  • JeroenKrah Profile Picture
    12 on at
    Re: Copy a single file from FTP to Google Drive

    Hi Alan,

    I figured it out, and it works. I left in the expression 'Compose_File_Name', which is of course the name of the action as you named it. So, I changed it in the name of my action and that did the trick.

    Thanks so much for your help.

     

    Jeroen

     

  • JeroenKrah Profile Picture
    12 on at
    Re: Copy a single file from FTP to Google Drive

    Hi Alan,

     

    I get an error on the condition box. It tells me that the (I need to translate it from Dutch) template expression can not be processed because the function outputs is not defined or valid. I tried to use the Dutch translation for outputs which is 'uitvoer' but that gave the same error. The filename in question is called Reporting_Entry.csv.

     

    error2.jpg

    error1.jpg

    error3.jpg

     

     

     

    As you can see, I am also not getting 'outputs' as a function in the list.

     

    Jeroen

     

     

  • JeroenKrah Profile Picture
    12 on at
    Re: Copy a single file from FTP to Google Drive

    Hi Alan,

    Thank you for this! You are correct in your assumtion.

    I will work and implement it.

    Strange that it is not built in the flow itself.

    On my Google Drive I have a sheet that imports the csv file (with SheetIE addon) and then deletes the file. So, no issues with the existing file (I had the error as well). Interesting is that GD can also host multiple files with the same filename. In the windows synch folder the have a number added (filename(2).csv, filename(3).csv, etc..) 

    I let you know.

     

    Jeroen

  • v-yuazh-msft Profile Picture
    on at
    Re: Copy a single file from FTP to Google Drive

    Hi @JeroenKrah,

     

    I agree with @AlanPs1's solution for encoding the file name.

    Have problem been solved?

    If yes, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

    If no, please feel free to ask for help here.

     

    Best regards,

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

     

  • Verified answer
    AlanPs1 Profile Picture
    2,471 on at
    Re: Copy a single file from FTP to Google Drive

    Hi @JeroenKrah, thank you for posting this.

     

    If I am understanding correctly you say "So, I used the Condition and put in the CASE = yes the filename that I want. Next is adding the file to the Google drive. But all the files, including the wanted file are ending up in the CASE = no box."

     

    I am understanding that you only want the one file that updates every 5 hours to move to google drive, not the rest?

     

    I have had a look and have created a condition that will get just 1 file from the FTP folder.

     

    Here is an explation firstly as to why it has been handles in the way:Capture-251.png

    FTP returns the file name in base 64 format, so it needs converting before the real file name will match.

    Please see below on how I have done this:

    Capture-253.png

    You will see below the new output of the file when I have used base64ToString() to convert the file name.Capture-254.png

     Without the conversion, any condition you will write will try and match "ZmlsZTEyMTM0NTYucGRm" (in my example) as the file name.

     

    With the above set up just one file is targetetd and it moves to google drive. I am not sure how Google drive will handle overwriting the file, in my testiong it errored if file name existed already but at least now you can maybe write a condition that is more likely to match on file name.

     

    Thanks, Alan

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 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,552 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow