Since I found this post while looking for a solution for a similar probelm, I thought to add some pointer for the future visitors.
First of all the screenshot here is ambiguous, there were two (2) attachments, the one with ".doc" extension was fine (confirmedby the green tick), and there must have been another attachment with ".txt" extension or content type as text, which got failed with that error.
I have received some pointer from this post, which suggested to add a check on file name extension and wrap the content with base64 function for text files.
So for regular files I have used:
{
"content": {
"$content-type": "@{body('Get_file_content')['$content-type']}",
"$content": "@{body('Get_file_content')['$content']}"
},
"Name": "@{items('Apply_to_each')?['{FilenameWithExtension}']}"
}
and for txt:
{
"content": {
"$content-type": "text/plain",,
"$content": "@{base64(body('Get_file_content'))}"
},
"Name": "@{items('Apply_to_each_-_attachments')?['FilenameWithExtension']}"
}
I would like to see a post with details on supported file types, since it was not very clear why the text attachments will fail. Also, it would be good to know if there are any other extensions / content types which are not supported. It wouldn't be ideal to create a condition for each such file types 😞
