Attachments and documents

How do I generate a PDF from a document template in an integration and email or store it?

Use Generate a PDF document with the item's instance ID, then map the generated document into the email's Attachments or the storage action.

How-to

Short answer: Add Generate a PDF document and map the item's instance ID from the trigger, not the process ID. Then map the generated document into the email's Attachments or into your storage action.

Why it happens

  • The PDF action needs the ID of the specific item. A process ID generates nothing.
  • The template list shows only what the connection's account can access.
  • The email step can't see the generated document until the PDF step has produced output in a test.

How to fix it

  1. Add the Kissflow Process action Generate a PDF document. It shows as Generate PDF in the flow.

  2. Under Select process instance ID, map the _id from the trigger step. See associating a document template.

    Generate PDF step configuration with the process, the trigger's _id as process instance ID, the template, document title and attachment field options

  3. If the template list is empty and you use a service account, make that account an admin of the process. Member access isn't enough.

  4. To store the PDF on the item, set Do you want to attach the document in the form? to Yes and pick the attachment field.

  5. Test the PDF step so the document appears in its output. Then add Send an email and, under Attachments > Fields > Generate PDF, select document.

  6. To upload the PDF to storage such as Dropbox, choose the document's key under Select All, not the first document.

If dates in the PDF differ from the form, set the date order in the template with Format > Time zone. See date and time zone.

Important

You get one PDF per item. Merging several PDFs into one file has to happen outside Kissflow. PDF generation handles a payload up to 10 MB and up to 45 seconds of processing, and a table shows up to 10 columns.

Related answers