I am facing an issue with attaching documents in an approval flow. My form includes two questions for document uploads, and I need these files to be sent as attachments in the approval step. I’ve set up the flow with two actions for file content: two Compose actions, two Initialize Variable actions, and two "Apply to Each" loops to get the file content and append it to an array variable.
However, I encounter a problem when trying to include both initialized variables as attachments in the "Start and Wait for an Approval" action. The flow fails to save when I attempt to add both variables in the attachments section.
I receive the following error:
Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'WebhookApprovalCreationInput' validation failed in workflow operation 'Start_and_wait_for_an_approval': The parameter with value '"[\n {@{variables('VendorInvoice')}},\n {@{variables('VoidCheque')}}\n]"' in path 'WebhookApprovalCreationInput/attachments' with type/format 'String' is not convertible to type/format 'Array'.'.
I have attached screenshots of how I structured the Initialize Variables in file attachments and the complete flow. Any guidance or help to resolve this issue would be greatly appreciated!