
Announcements
I’m working with Power Automate, and I receive an HTTP response body that looks like this:
I understand that this represents a binary file (an Excel .xlsx file), but it is encoded with Unicode escapes. How can I transform this data in Power Automate to save it as a usable .xlsx file?
Hi @RO-13120305-0,
Saving an HTTP response containing Unicode-escaped binary data (like your Excel .xlsx file) into a usable file requires decoding and properly saving the binary content. Here's how you can achieve this in Power Automate:
PK\u0003\u0004\u0014\u0000\b\b\b\u0000...) is a binary file encoded in Unicode escape sequences.\u sequences need to be decoded into binary data before saving the content.Decode the Unicode Escapes:
Power Automate doesn’t natively handle decoding Unicode escapes, but you can use an Azure Function or an inline expression in Power Automate to decode it.
Option 1: Use Azure Function (Preferred for Complex Data):
Option 2: Decode with a Premium Connector (Expression-Based):
Save the Decoded File:
After decoding the response, use Power Automate’s Create file action to save the binary content as an .xlsx file.
Report.xlsxIf the HTTP response is Base64-encoded (a common format for binary files), the process is simpler:
Verify the Input Format:
Validate the Decoded Output:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) when handling the file in downstream systems.Let me know if you need further clarification or help implementing these steps!
Best regards,
@Ninjasabi