Announcements
Hi Team,
Iām trying to implement an HTTP action in Power Automate to send a request with multipart/form-data, where I need to:
I need to call an API endpoint that expects:
schemaName
I attempted using the HTTP action with custom headers and body, but Iām facing issues with:
Something like:
--PowerAutomateBoundary Content-Disposition: form-data; name="schemaName" schema1 --PowerAutomateBoundary Content-Disposition: form-data; name="File"; filename="@{triggerBody()?['fileRecord']?['name']}" Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet @{triggerBody()?['file']?['contentBytes']} --PowerAutomateBoundary--
Any working example or guidance would be really helpful.
Thanks in advance!
Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.
{ "$content-type": "multipart/form-data", "$multipart": [ { "headers": { "Content-Disposition": "form-data; name=\"schemaName\"" }, "body": "schema1" }, { "headers": { "Content-Disposition": "form-data; name=\"file\"; filename=\"@{triggerBody()?['fileRecord']?['name']}\"", "Content-Type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }, "body": { "$content-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "$content": "@{triggerBody()?['file']?['contentBytes']}" } } ] }
The issue occurs because the HTTP action body is treated as a plain string. When contentBytes (Base64) is pasted into the multipart body, the API receives Base64 text instead of the actual binary file, resulting in a corrupted upload.
contentBytes
Instead, use the HTTP actionās native $multipart schema, which automatically converts the Base64 content back to binary before sending. Also, do not manually set the Content-Type: multipart/form-data headerāPower Automate generates the correct boundary automatically.
$multipart
Content-Type: multipart/form-data
Note: This JSON format may need to be entered using the actionās code/peek view, and it requires the Premium HTTP action.
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.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Valantis 481
11manish 278
David_MA 276 Super User 2026 Season 1