I'm trying to create a flow that does the following --
Receive an email with attachments --> Post an Adaptive Card to a Teams user and wait for a response -> Use that response to create an approval for the individuals designated in previous step and any attachments that were included on the initial email should be added to the Approval flow.
After receiving the data from the adaptive card in Teams, I initialize an Array variable called attachmentArray.
I then have an Apply to each loop on the Attachments output from the initial When a new email arrive (V3) step. In this loop, I have an Append to array variable step with the following Name/Value --
Name: attachmentArray
Value: {
"name": @{items('Apply_to_each_attachment')['name']},
"contentBytes": @{items('Apply_to_each_attachment')?['contentBytes']}
}
The next step, the approval, fails with 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 643.'.'.
I don't seem to be able to paste images to this forum unfortunately, so hopefully someone can make sense of what is happening.
Thanks in advance.
Phil