Hello!
The "Merge PDF" action can process only PDF-files so you have to prepare your images for merging. Below, I will show you how to create a DOCX-file with the submitted images and convert it to PDF so it could be merged with other PDF-files or saved as a separate one. The described approach can be integrated in your flow with all modifications you find necessary.
-
Parse JSON of the attachments field output:
-
Generate a schema from a sample output of the "Get response details" action:
-
Create an array variable to store objects with images
-
Check whether a name of each attachment ends with an image extension (the condition is within "Apply to each" block):
-
If true, get file content from OneDrive by ID (all submitted attachments are stored there), compose an object with file content and append it to the array variable:
-
Get a DOCX-template, the token in it should be the same as the property name in the composed object. Use picture formatter to process the image.
-
Create a document from the template, just pass the array to it as template data, then convert it to PDF.