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.'.'.
I have configured "Append to array variable" like this:
{
"Name": [DisplayName],
"ContentBytes": [Attachment Content]
}
How can I solve it?
It is really important for me.
Thanks
Federico
Solved! Go to Solution.
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 @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
How did you solve this? base64? Can you show a screenshot?
{
"content": {
"$content-type": "@{body('Get_attachment_content')['$content-type']}",
"$content": "@{body('Get_attachment_content')['$content']}"
},
"Name": "@{items('Build_Attachment_array')?['DisplayName']}"
}
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')) }
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
28 | |
28 | |
26 | |
25 | |
22 |
User | Count |
---|---|
64 | |
52 | |
44 | |
34 | |
30 |