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 / 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
    on at

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

  • Community Power Platform Member Profile Picture
    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
    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

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard