Documentation · Templates

Handlebars templates

Many node fields (prompts, URLs, HTTP bodies, messages, sheet values, and more) support Handlebars templates. Insert upstream outputs with {{variableName}}, or call built-in helpers such as {{now}}.

Basics

Templates are rendered with workflow context — the shared object of upstream node outputs keyed by each node's variable name. HTML escaping is disabled so quotes and JSON stay intact.

  • {{myVariable}} — insert a context value as a string
  • {{myVariable.field}} — nested path on an object
  • {{json myVariable}} — serialize an object / array as JSON text
  • Helper arguments can be literals or context paths, e.g. {{add count 1}}
Hello {{user.name}},

Today is {{now "YYYY-MM-DD"}}.
Request time (ISO): {{now}}

Payload:
{{json httpResult}}

Variable names come from each node's variable field in the editor. See the node catalog for which data fields accept templates.

{{now}} — date and time

{{now}} evaluates when the node runs (server local time for formatted output; ISO for the no-arg form).

TemplateResult shape
{{now}}ISO-8601, e.g. 2026-08-08T17:41:00.123Z
{{now "YYYY-MM-DD"}}2026-08-08
{{now "DD/MM/YYYY HH:mm"}}08/08/2026 20:41
{{now "YYYY-MM-DD HH:mm:ss"}}2026-08-08 20:41:00

Supported format tokens: YYYY, MM, DD, HH (24h), mm, ss. Any other characters in the format string are kept as-is.

Built-in helpers

now{{now}} or {{now "YYYY-MM-DD HH:mm:ss"}}

Current date/time. With no argument, returns an ISO-8601 string. With a format string, substitutes YYYY, MM, DD, HH, mm, ss.

json{{json variableName}}

Pretty-prints a context value as JSON (2-space indent). Useful for HTTP bodies and prompts.

add / sub / mul / div / mod{{add a b}} · {{sub a b}} · {{mul a b}} · {{div a b}} · {{mod a b}}

Numeric math. Non-numeric values become 0. Division or modulo by 0 returns 0.

eq / ne{{eq a b}} · {{ne a b}}

Strict equality / inequality (=== / !==). Example: {{eq status "ready"}} is true when status is exactly the string ready.

gt / gte / lt / lte{{gt a b}} · {{gte a b}} · {{lt a b}} · {{lte a b}}

Numeric comparisons: gt = greater than (a > b), gte = greater than or equal (a >= b), lt = less than (a < b), lte = less than or equal (a <= b). Both sides are coerced to numbers first (e.g. the string "10" becomes 10). Values that cannot be parsed as numbers are treated as 0. Example: {{gt score 80}} is true when score is greater than 80.

and / or / not{{and a b}} · {{or a b}} · {{not a}}

Boolean logic: and is true when both sides are truthy, or when either side is truthy, not flips a value.

{{!-- Math --}}
{{add price tax}}
{{mul quantity 2}}

{{!-- Comparisons (often used by Switch / Condition expressions) --}}
{{eq status "ready"}}
{{gt score 80}}

{{!-- Logic --}}
{{and isActive isVerified}}
{{not isDraft}}

Comparison helpers explained

These helpers return a boolean and are commonly used in Switch / Condition expressions.

HelperMeaningExample
eqEqual to (===){{eq status "ready"}}
neNot equal to (!==){{ne status "ready"}}
gtGreater than (a > b){{gt score 80}}
gteGreater than or equal (a >= b){{gte score 80}}
ltLess than (a < b){{lt score 80}}
lteLess than or equal (a <= b){{lte score 80}}

For gt / gte / lt / lte, both sides are coerced to numbers before comparing. So a string like "10" becomes 10. Values that cannot be parsed as numbers are treated as 0.

Where templates apply

Any node field that mentions variables / Handlebars in the editor supports this syntax — for example OpenRouter and Agent prompts, HTTP URL/body/headers, Telegram / WhatsApp messages, Gmail subjects and bodies, Google Sheets / Docs fields, File node URLs, Switch case expressions, and Wait-for-response messages.

The Code node is different: it runs JavaScript against a context object and does not render Handlebars in the code body.

We use cookies
We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.

Learn more