Skip to content

Generate document

2 min read · By Stefan Köhn

Fills a document template with the values of the record and files the finished PDF in a file field. Letters, contracts and quotes come into being without handwork: and sit where the next step finds them.

Step by step

  1. In the flow, choose the plus and take Generate document.
  2. Press New template, give it a name and choose Create and open: the editor opens in a new tab, the step stays beside it.
  3. In the editor, upload the PDF and drag the elements onto it: text from a field, date, tick, signature.
  4. Publish the template. A draft appears in the list but produces nothing.
  5. Back in the step, choose the file field under Target field that the PDF goes into.
  6. Leave Replace existing on, otherwise two documents sit in the field after the second run: and an email attaches both.

Why are the templates not under settings?

Because there are none there. Nobody thinks about a template on its own: you think "once the lead is qualified they should get the quote" and need the PDF at exactly that point. So it is created and edited from this step, and only from there.

Where do the values in the document come from?

From the same context as the text of an email beside it: the record's field values, outputs of earlier steps, the assigned person. A separate context would be a second one, and then this step would fill its document differently.

What do draft or no PDF yet mean behind a template?

Both mean it produces nothing yet. No PDF yet asks for the background document, draft asks for publishing. Both are fixed in the editor, in that order.

Does this work without the automation module?

Only halfway. The button on the file field produces a document from an existing template, automation or not. But a template can only be created here: without the automation module you cannot reach a new one.

What happens without a template or without a target field?

The step fails instead of quietly doing nothing. Nothing would be produced, and a skipped step looks like a finished one in the inspector.

Can I send the document straight away?

Yes, with a Send email after it: choose as the attachment the file field this step wrote into.