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:
Could I be missing a step in processing the content before creating the file?
How can I ensure that the data from the API is correctly passed to Power Automate and saved as a valid ZIP file?
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.
Was this reply helpful?YesNo
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.