Power Automate error when trying to add an attachment array from plumsail

Viewed 21

I have a Plumsail form where a user can attach several pdf or word documents. In power automate I create an array of these documents and then attach the array to the "Start and wait for approval" action. When I run it, I get the error below:

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'.

1 Answers

I'm assuming you followed the How to send an email from Plumsail form with Power Automate Plumsail guide as it tells you to assign the HTTP GET file response to a property named ContentBytes.

While this will work with the Send an Email (V2) action (from the guide) the Start and wait for an approval action expects a property named content content.

To fix the problem append the following object to the array (note the contentproperty):

{
  "name": @{items('Apply_to_each_2')?['file']},
  "content": @{body('HTTP')}
}

or as an image: enter image description here

Related