cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FedericoCoppola
Helper III
Helper III

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

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

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ManishJain,

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

 

Best regards
Federico

View solution in original post

6 REPLIES 6
ManishJain
Solution Sage
Solution Sage

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

Hi @ManishJain,

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

 

Best regards
Federico

View solution in original post

Hi @ManishJain ,

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

 

Federico

ManishJain
Solution Sage
Solution Sage

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
Resolver I
Resolver I

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

yaheardj
New Member

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

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (976)