Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Unable to decode file content

(3) ShareShare
ReportReport
Posted on by 8
Hi,
 
Long time listener, first time caller.
 
(1) I have a flow which is grabbing a TAB delimited file (saved with a .CSV extension) from an email attachment, this is the current / latest version. Content type: application/csv
(2) It's and also grabbing the previous version of the same report from SharePoint using 'Get file content using path'. Content type: application/octet-stream
 
When I built and tested the flow using get file content from OneDrive for business, it was working fine.
 
Now, the data returned from both actions is not human readable, I have tried both base64ToString and decodeBase64 functions but neither will make any difference; I have also tried changing 'Infer content type' parameter from 'true' to 'false'.
 
 
 
 
 
 
The output of all four 'Compose' actions looks exactly like this:
 
 
Any suggestions gratefully received, thanks in advance.
 
  • elsiegit Profile Picture
    8 on at
    Unable to decode file content
    Thank you for the suggestion, Ellis. Unfortunately it didn't make any difference. I think the file I am trying to ingest isn't compatible with base64ToString function, possibly due to the Byte Order Mark included? Specs are:
     
    • IBM® Cognos® Analytics can produce reports in CSV format so you can open them in other applications, such as Microsoft Excel spreadsheet software.

       

      Reports saved in CSV format

    • support Unicode data across many client operating systems
    • are UTF-16 Little Endian data encoded
    • include a BOM (Byte Order Mark) at the beginning of the file
    • are tab-delimited
    • do not enclose strings in quotation marks
    • use a new line character to delimit rows
  • Verified answer
    Ellis Karim Profile Picture
    11,069 Super User 2025 Season 1 on at
    Unable to decode file content
    Try the following, using the Attachments property in an Apply to each loop:
     
     

     
     
    base64ToString(items('Apply_to_each')?['contentBytes'])
     
     
    Ellis
     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492