Skip to content

Build reusable documents with input variables

Input variables turn fixed document content into a reusable template. You define the values a document expects, place tokens such as {{customer_name}} in its content, and let an Automation workflow supply the real values when it generates a document.

An input-variable definition belongs to the document. It describes the name, type, default, and whether a value is required. The actual value is supplied later by an Automation Generate Document action.

Open a saved document in the Document Builder, then choose Input Variables (the code icon) in the right side of the top toolbar. The number on the button is the number of variables defined for the document.

The panel opens as a compact list showing each existing variable’s name and type. From here you can:

  • choose Add New to define a variable;
  • choose the edit button beside an existing variable to change it;
  • click a variable to insert its token into the last focused text field; or
  • drag a variable into a supported text field while keeping the panel open.

The button is disabled until the document has been created and has an ID.

  1. Open Input Variables.
  2. Choose Add New.
  3. Complete the variable form.
  4. Choose Save.

After saving, the form closes and the updated name-and-type list returns. The document auto-save queue then stores the new definition.

Field Purpose
Name The machine-readable key used inside {{...}}. It is required, must be unique, and may contain letters, digits, and underscores. It must start with a letter or underscore. Example: customer_name.
Label The human-readable name shown when an Automation author maps the variable. Example: Customer name.
Type Describes the expected value: text, number, date, URL, email, boolean, color, or image.
Default A fallback used when Automation supplies no value. Leave it blank when there is no safe fallback.
Description Explains what should be supplied. Automation displays it beneath the matching input.
Required Prevents Generate Document from running without a supplied value or a non-empty default.

A document can define up to 50 variables. Names are case-sensitive, so customer_name and Customer_Name are different keys; use one naming convention consistently.

A default satisfies a required variable. For example, a required report_date with a default of 2026-09-04 can still generate when the workflow does not map that field. A required variable with no default must be bound in Automation.

Defaults are template fallbacks, not live previews. The Document Builder continues to show the token while you author the template.

Choose the edit button beside a variable, change its fields, then choose Save. The panel returns to the list with the updated definition.

If you change Name, update every matching token in the document and every workflow that maps the old name. Renaming the definition does not rewrite tokens already stored in component content.

The current panel supports adding and editing definitions. It does not provide a delete control.

A document token uses the variable name by itself:

{{customer_name}}

You can mix free text and several variables in one field:

Prepared for {{customer_name}} on {{report_date}}

There are two insertion methods.

  1. Click where the token should go in a text field on the canvas or in the Properties panel.
  2. Open or return to Input Variables.
  3. Click the required variable in the list.

The token is inserted at the cursor in the last focused compatible field. Selected text is replaced; otherwise the token is inserted at the cursor.

Drag a variable row from the panel and drop it at the required position in a compatible text field. The operation copies the token; it does not move or remove the definition.

Token insertion supports ordinary text, search, email, URL, and telephone inputs, multi-line text areas, and rich-text editing areas. A token cannot be dropped directly into a checkbox, select menu, number control, file picker, or other non-text control.

If a structured component has no compatible text input for the value you need, use a text-capable field or component instead. Automation substitutes tokens stored in the template data; it does not change the component’s field type.

The Document Builder intentionally displays tokens such as {{customer_name}}. It does not prompt for runtime values or replace tokens with defaults on the canvas.

Replacement happens when Automation runs Generate Document:

  • an exact token can preserve a number or boolean value in structured component data;
  • a token inside a longer sentence becomes text; and
  • an object or array used inside text is written as JSON rather than [object Object].

The generated document stores the resolved content as a new draft in the workflow’s service.

Input variables belong to the document while you are editing. To expose their definitions to Generate Document, save the document as a reusable template:

  1. Open Actions in the Document Builder toolbar.
  2. Choose Save as Template.
  3. Enter the template name, description, and category.
  4. Leave Include input variables enabled when Automation should display named binding fields.
  5. Choose Save.

The toggle is enabled by default when the document has variables and is disabled when it has none.

Turning the toggle off excludes the definitions only. It does not remove {{variable_name}} tokens already present in component content. Those tokens will not get named binding fields in Generate Document, so exclude definitions only when you deliberately want a fixed or manually mapped template.

Creating an ordinary document from a template copies any included variable definitions into the new document. It does not ask for values during creation.

Create these definitions:

Name Type Required Default
customer_name text Yes —
report_date date No 2026-09-04
total_due number Yes —
approved boolean No false

Add tokens to the document:

Account report for {{customer_name}}
Report date: {{report_date}}
Total due: {{total_due}}
Approved: {{approved}}

Save it as a template with Include input variables enabled. Automation will show four named bindings when that template is selected.

Generate documents with input variables explains how an Automation workflow binds trigger data, workflow variables, and action outputs to these definitions.