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 / Flow Corrupts CSV File...
Power Automate
Unanswered

Flow Corrupts CSV File - Copy from FTP to OneDrive

(0) ShareShare
ReportReport
Posted on by 4

 Hey guys!

 

I'm trying to pull some files from the FTP server to OneDrive(Personal) as soon as they are added/modified, however, when I pull them, they get corrupted.

 

However, if I get it directly through another program, the file comes out perfect.

 

I have already marked the parameter "Binary Transport".

 

I don't know what else to do, can you help me please?

 

Grateful.

 

parameters.png

binary.pngcsv error.png

 

Categories:
I have the same question (0)
  • elliottliu Profile Picture
    13 on at

    Hello!

    I just spent some time figuring out what was going on here. It seems like it's to do with the way Power Automate encodes the .csv file when it's created. You need to get the .csv file encoded into a UTF-8 format. To do this, you need to add some special characters at the beginning of the .csv file:

     

     

    concat(uriComponentToString('%EF%BB%BF'), body('Create_CSV_table'))

     

     

    In your instance, replace the "body('Create_CSV_Table')" with the file coming from your FTP server.

     

    I've tested it out and can confirm that this works.
    Power Automate CSV UTF-8 EncodingPower Automate CSV UTF-8 Encoding

    Hope this helps!

  • gustavofill Profile Picture
    4 on at

    Hello elliottliu!

    First of all, thanks for taking the time to help me!

    I made the attempt as mentioned by you, the flow worked, however, the final file is still corrupted, as shown in the screenshots below.

     

    test .csv.pngtest.png

  • elliottliu Profile Picture
    13 on at

    Hi, no problem!

     

    Sorry for the confusion, the screenshot I included above is just for demonstration purposes. You should only need the two steps as you did in your original flow.

     

    In the the OneDrive for Business "Create file" action try replace the "File Content" with the expression:

    concat(uriComponentToString('%EF%BB%BF'), triggerOutputs()?['body'])

    You may need to substitute "triggerOutputs()?['body']" with the dynamic content output from your FTP trigger action.

     

    It should look something like this when you're done.

    elliottliu_0-1641457924460.png

  • gustavofill Profile Picture
    4 on at


    Hi!

    Unfortunately the problem remains, I think this decryption method is not working.

    When I open it in notepad, it shows me "UTF-16 LE" as print. I don't know if that helps.

    notepad.pngcorrupt.png

  • mattiabergo Profile Picture
    17 on at

    Hi,

    I've the same issue by using an xlsx instead. comes from his source correct, but after the FTP get content action it is corrupted, even with the binary transfer flag set.

     

    This is my topic link: FTP downloaded Excel file is corrupted - Power Platform Community (microsoft.com)

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard