Insert attachment from form into document

Hi, I'm pretty new to Plumsail. I've created a form that gets user input and inserts it into a template. In this case, it's for a subcontract. In the form, I've added an attachment field, and used the token at the end of the template. Of course, that just added the attachment info instead of the attachment itself.

How can I append the attachment itself (jpg, docx, or pdf) to the end of the template? Is it possible to format it?

The template process includes sending with docusign. I can use PowerAutomate to create a flow but I am not sure where to start. Thanks

Hi @EHaya,

  1. To insert an image from Plumsail Forms and Microsoft Forms attachments please check the thread.

  2. To append docx or pdf attachments you can use * Merge DOCX or * Merge PDF actions. In that case, you create a result document from a template and then use the mrge actions to attach the docx or pdf file to the source template.

  3. Also, there is a helpful article that shows how to work with Microsoft Forms attachments. Please take a look.

Convert Microsoft Forms with attachments to PDF

Best regards,
Petr
Plumsail team

Hi Petr, thanks for the reply.

Is this possible to do with one form and one template? I don't understand how it would be possible to do with one trigger. I can create a second template for attachments, so when the form is submitted I can create a docx with the attachment file data, but how can I then merge with the existing template, that is populated with the rest of the fields on the form.

Would I have to send the attachment file to Sharepoint, then use a 'When Document process is finished' trigger to start a different flow that looks in the Sharepoint folder for a document with a matching ID?

Hi @EHaya,

This is the possible flow: I use one Microsoft Form. It has one text field. This value goes to my DOCX template. Also it has an attachment field to attach a docx file. Then I merge the document that I received from the DOCX template and the docx attachment.

The form:

The flow:

To get the DOCX attachment I use OneDrive for business and an output from Parse JSON value.

Once i have a result from Documents process and the attachment from OneDrive I merge them.

A more complex case with several attachments is described in the article.

Convert Microsoft Forms with attachments to PDF

Best regards,
Petr
Plumsail team

Hi Petr,

Thanks for the response. I'm trying a few things in power automate. However, I'm not using Microsoft forms for the initial submission, it's a plumsail form. I have the url where the the blob is hosted (plumsail.blob.core.windows.net/[blob]), but using the 'download attachments' plumsail action in power automate gives me a 'file is corrupted' error. Am I going about this correctly? Attached are some screenshots of the failed flow and the edit view.

image

Ah, I was being silly. I am trying to merge a PDF and a Docx. I will convert everything to PDF or limit users to only submitting docx attachments and retry.

Hi, by turning the word doc into a pdf in plumsail and only allowing PDF attachments, I'm able to merge the documents correctly. However, I have a few docusign anchors in the PDF that are no longer being able to be read.

\i1\ \approve1\ \s2\ \d2\ \s3\ \d3\ are the tags in the template.

After merging the PDFs with the plumsail action, I create an envelope, add 3 recipients in signing order, and then I want to add Tabs to lock where they can sign. However, the Docusign action 'Add tabs for a recipient on an envelope' fails with 'The specified Anchor Tab string was not found in the document. Anchor Tab String "\i1\" not found.'

I have created matching Custom Document Fields in docusign, not sure if that's related or necessary. When using the send with Docusign process in Plumsail, the anchors work as expected.

resolved this by creating a file in onedrive with the merged file contents, then sending the created file to docusign. this appears to have worked, the anchor text is now being read by the docusign actions.

1 Like