web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Posting a file via HTT...
Power Automate
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.

 
 
 
Categories:
I have the same question (0)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard