Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Posting a file via HTTP fails when content-type is set

(1) ShareShare
ReportReport
Posted on by

I'm trying to post a file to an API service. When passing the without content-type the api obviously can't handle the file correct. But Power Automate don't allow me to send the content-type. It errors "The provided workflow action input is not valid". Tryied it out with several content-types like octet-stream or text altough I know the API takes the file as an "message/rfc822" MIME type.

Here is the body part of my HTTP Post which will fail:

 

{
"$content-type": "multipart/form-data",
"$multipart": [
{
"headers": {
"Content-Disposition": "form-data; name=\"file\"; filename=\"test1.msg\""
},
"body": {
"$Content-type": "message/rfc822",
"$content": "@{outputs('Get_AttachmentContent')?['body']}"
}
},

Edit: Stripped of my attached picture which was presented in the previewbox before posted. So I added it as plain text.

 
 
 

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1