Table of Contents
Working with binary data in HTTP requests is a common requirement when integrating Power Automate with external systems and APIs, but handling binary content correctly requires an specific format in Power Automate to obtain successful responses from the API service.
This is how a regular binary content request looks in Postman:
In this guide, we’ll explain how to convert above and how to send binary data in Power Automate through the HTTP request action and how to combine it with SharePoint’s get file content.
Step 1. Get File content from SharePoint
First, let’s get the content of the file we want to upload to the external system. For that, we will use the “Get file content” action from SharePoint.
For this example we’re directly selecting the PDF file from the file selector in Power Automate, but this can totally be dynamic content from another step if needed.
Step 2. Create HTTP request with binary data
The body for the HTTP request when sending binary data is as follows:
{
"$content-type": "multipart/form-data",
"$multipart": [
{
"body": {file content from previous step},
"headers": {
"Content-Disposition": "form-data; name=\"file\"; filename=\"{filename with extension}\";"
}
}
]
}
How our Power Platform Development services can help
If you need help implementing HTTP requests, custom connectors or any type of integration between Power Automate and external systems, contact us and we’ll be more than happy to have a conversation and see how we can be of help to your team.
