Document Step

Document steps generate Word (.docx) or PDF files from your templates and workflow data.

Add a Document step anywhere in your workflow, select a template, and map workflow variables to the template's tags.

Example

An accounting firm collects a client's name, company and email with a form. A Document step fills an engagement letter template with those answers and generates a PDF. An Email step sends the letter to the client, and a Google Drive step saves a copy in the client's folder.

Adding a Document Step

The Document step card in the workflow editor, labeled Generate document

Add a Document step to your workflow and select a template from your organization's template library.

You can:

  • Generate documents in DOCX or PDF format
  • Use any template from your template library
  • Map data from previous workflow steps to template tags
  • Add multiple Document steps to generate different documents

Mapping Data to Documents

Templates contain dynamic tags, such as {{ Name }} or {{ CompanyName }}.

The Document Mapping editor lets you map workflow variables to these tags. Drag variables from previous steps to the corresponding template tags to control the data used when the document is generated.

Workflow variables can come from forms, webhooks, formulas, integrations, or any other previous step in the workflow.

Dragging the Company Name workflow variable onto its matching template tag in the Document Mapping editor

Loops

Template loops can be mapped to arrays of workflow data.

For example, a table field in a form can collect multiple rows of data, a CRM step can return a list of records, and a webhook payload can include an array of data.

Select the source array for the loop, then map values from each array item to the tags inside the loop. This makes it easy to generate tables and repeating sections from data such as order items, invoice lines, or contacts.

You can also use array expressions to filter, sort, or select data before mapping it to a loop.

Using Generated Documents

Once generated, a document becomes available to later steps in the workflow.

You can attach it to an email, upload it to cloud storage, or use it in other supported workflow steps.

Credits

Each Document step that runs costs 1 credit. The first 3 credits after the trigger are included in every run. See Credits.

Next Steps