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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Suggested Answer

API - Base64ToBinary

(0) ShareShare
ReportReport
Posted on by
Hello everyone,
I’m working on a Power Automate flow to download a ZIP file from an API and save it in a SharePoint folder. The file returned by the API is encoded in Base64, and I’m using the base64ToBinary function to convert it to binary content before creating the file.
The flow runs successfully, and the file is saved with a .zip extension. However, when I try to open the file, I get an error saying it’s corrupted or in an unsupported format.
Additional details:
  • The API response includes:$content: Base64-encoded content
    $content-type: application/zip
    Content-Disposition header: includes a valid filename
    Content-Length: 5704 bytes

     
My questions:
  1. Could I be missing a step in processing the content before creating the file?
  2. How can I ensure that the data from the API is correctly passed to Power Automate and saved as a valid ZIP file?
I’d really appreciate your help!
Categories:
I have the same question (0)
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
    here are the steps:
     
    HTTP Action: Retrieve the file from the API.
    Compose Action: Decode Base64 to binary using -base64ToBinary(outputs('HTTP')?['body']['$content'])
    Create File Action (SharePoint):File Name: Extracted or static filename. File Content: Output from the Compose action.
    let me know if you need mor details. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard