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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Flow attachment Error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Reza. I am getting this error message when I try to attach an attachment using a flow based on following the steps on your youtube video.  The error message is shown below.  Not sure if it has something to do with the format of the file? or base64 format? If I run the flow without the attachment it works fine, so it seems to be something with the attachment. 

 

The request failed. Error code: 'InvalidRequestContent'. Error Message: 'The request content was invalid and could not be deserialized: 'Unexpected character encountered while parsing value: {. Path 'attachments[0].content', line 1, position 659.'.'.

 

rsydney23_0-1624687565169.png

 

rsydney23_1-1624687660041.png

 

rsydney23_2-1624687748532.png

@RezaDorrani 

 

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello, all hope someone can help me with the issue below. I have posted all the steps in my flow up until the error. Hope someone can help me solve the issue.

     

    rsydney23_6-1624760233379.png

    rsydney23_1-1624759651121.png

    rsydney23_2-1624759698137.png

    rsydney23_4-1624759843694.png

     

    Error Message

     

    rsydney23_5-1624760122629.png

     

    @RezaDorrani 

     

  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @Anonymous 

    In your array, replace "content" with "ContentBytes"

    Additional information can be found here.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the response Scott. I still get an error when I change it to ContentBytes at the Approval Step

     

    rsydney23_0-1625230073752.png

    This is the steps

     

    rsydney23_2-1625230389052.png

    rsydney23_1-1625230265254.png

     

  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @Anonymous 

    I had to play with this for a while....

    This works for me - Content rather than content or ContentBytes when attaching to an approval:

    image.png

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Still get the same error message

    rsydney23_0-1625269444168.png

     

    I copied the output content in the array to see if this helps

     

    {
      "Name": "2021-06-24T23_02_54.7849879Z.csv",
      "Content": {
        "$content-type": "application/octet-stream",
        "$content": "U0RfUHJhY3RpY2UsU0RfU29ydF9Qcmlvcml0eSxUaXRsZQ0KVGVjaG5vbG9neSxNZWRpdW0sQ2Vsb25pcw0KVGVjaG5vbG9neSwsRGV2ZWxvcG1lbnQgLyBBQkFQDQpUZWNobm9sb2d5LCxGaW9yaQ0KVGVjaG5vbG9neSwsTWlkZGxld2FyZSAmIEludGVncmF0aW9uDQpUZWNobm9sb2d5LCxSb2JvdGljIFByb2Nlc3MgVGVjaG5vbG9naWVzDQpUZWNobm9sb2d5LCxTQVAgQW5hbHl0aWNzIENsb3VkDQpUZWNobm9sb2d5LCxTQVAgQnVzaW5lc3MgV2FyZWhvdXNlIChCVy80SEFOQSkNClRlY2hub2xvZ3ksLFNBUCBCdXNpbmVzc09iamVjdHMgQkkgc3VpdGUNClRlY2hub2xvZ3ksTWVkaXVtLFNBUCBDcnlzdGFsIFNvbHV0aW9ucw0KVGVjaG5vbG9neSxNZWRpdW0sU0FQIEVuYWJsZSBOb3cNClRlY2hub2xvZ3ksLFNBUCBMaXRtb3MNClRlY2hub2xvZ3ksLFNlY3VyaXR5IGFuZCBJZGVudGl0eSBNYW5hZ2VtZW50DQpUZWNobm9sb2d5LCxTb2x1dGlvbiBBcmNoaXRlY3R1cmUNClRlY2hub2xvZ3ksLFN5c3RlbSBBZG1pbmlzdHJhdGlvbiAvIEJhc2lzDQpUZWNobm9sb2d5LCxUZWNobmljYWwgQXJjaGl0ZWN0dXJlDQpUZWNobm9sb2d5LCxTQVAgQ1BJDQpUZWNobm9sb2d5LCxTQVAgQ1BJLURTDQpUZWNobm9sb2d5LCxTQVAgQ0dJDQpUZWNobm9sb2d5LCxTQVAgUEkNClRlY2hub2xvZ3ksLE11bGVzb2Z0DQo="
      }
    }
  • Ellis Karim Profile Picture
    12,336 Super User 2026 Season 2 on at

    The flow should look something like this (my trigger was When a new email arrives in a shared mailbox (V2)):

     

    {
     "name": @{items('Apply_to_each')?['name']
     },
     "content": {
     "$content-type": @{items('Apply_to_each')?['contentType']},
     "$content": @{items('Apply_to_each')?['contentBytes']}
     }
    }

     

     

    ekarim2020_0-1625782083127.png

    Ellis

  • DennisTan Profile Picture
    51 on at

    Hello All,

     

    I came across the same issue and found a solution for it. You need to convert your content into base64 format. So your code should look like this:

     

     

    {
    "name":DisplayName,
    "content": base64(body('Get_attachment_content'))
    }

     

    image001.jpg

     

  • Verified answer
    JDH138 Profile Picture
    53 on at

    Great job mate this did the trick!

  • tbomar Profile Picture
    87 on at

    Can anyone assist. I'm getting similar error...

    Error occurs at start & wait for approval when adding dynamic content for the attachments variable.

     

    I tried following this tutorial - https://youtu.be/fSeGEBEs-kA

     

    Here is my error message - 

     

    tbomar_0-1652481881486.png

     

    Here is code - 

    tbomar_1-1652481942886.png

     

    tbomar_2-1652482031215.png

  • junortiz Profile Picture
    4 on at

    Only for approvals in power automate, this from the image worked for me, also if it is added with expression format base64(body(‘Get_attachment_content_2’)?[‘body’])
    junortiz_0-1720713814867.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard