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.