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 Platform Community / Forums / Power Automate / The request content wa...
Power Automate
Answered

The request content was invalid and could not be deserialized using Array

(0) ShareShare
ReportReport
Posted on by 87

Hi,

I stated to use Array in this flow due to I need to attach different document (if they exists) to Approval Mail.

 

When I save all seem to be good, but now that I am running and testing the flow I get the following error:

 

The request failed. Error code: 'InvalidRequestContent'. Error Message: 'The request content was invalid and could not be deserialized: 'Could not find member 'ContentBytes' on object of type 'ApprovalsConnectorAttachment'. Path 'attachments[0].ContentBytes', line 1, position 689.'.'.

 

 

FedericoCoppola_1-1604496501484.png

 

I have configured "Append to array variable" like this:

{
"Name": [DisplayName],
"ContentBytes": [Attachment Content]
}

FedericoCoppola_2-1604496715748.png

 

How can I solve it?
It is really important for me.

 

Thanks
Federico

 

 

 

Categories:
I have the same question (0)
  • MJain Profile Picture
    2,450 on at

    Hi @FedericoCoppola ,

     

    In Apply to each use concurrent settings and use Compose action with JSON format you have used . Outside of apply to each use another compose and in expression use outputs(Compose) , not many of us know about this feature to get array . 

     

    Thanks

  • Verified answer
    FedericoCoppola Profile Picture
    87 on at

    Hi @ManishJain,

    thanks for you reply!
    I have solved using base64() function.

     

    Best regards
    Federico

  • FedericoCoppola Profile Picture
    87 on at

    Hi @ManishJain ,

    can you explain it better?
    I did not understood very well, sorry!

     

    Federico

  • MJain Profile Picture
    2,450 on at

    Hi @FedericoCoppola ,

     

    In Order to form an array without using set variable action you can use compose action and do the same thing in compose action which you were doing in set variable inside loop. Outside loop you can do another compose action and use in expressions outputs(Compose) . This compose variable is from the loop. It will give you output as array.

     

    Thanks

  • jaina Profile Picture
    517 on at

    hi @FedericoCoppola  can you share the final workflow how it looks like? thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    How did you solve this? base64? Can you show a screenshot? 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

     

    {
    "content": {
    "$content-type": "@{body('Get_attachment_content')['$content-type']}",
    "$content": "@{body('Get_attachment_content')['$content']}"
    },
    "Name": "@{items('Build_Attachment_array')?['DisplayName']}"
    }

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    IG_Samuel_0-1645540909681.png

     

  • blueplanet Profile Picture
    17 on at

    I found this helpful:
    Solved: Re: Flow attachment Error - Power Platform Community (microsoft.com)

     

    It doesn't use Compose - you can convert the attachment content into Base64 within the Append to array function.

     

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

     

  • kpromma Profile Picture
    41 on at

    this helped!  thank you!!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard