Render Template
Generates dynamic text using the Handlebars templating engine.
Renders a Handlebars template against the incoming payload and adds the rendered text as text.
This operator allows you to merge data variables into a text template. It is ideal for constructing emails, SMS messages, HTML documents, or SQL queries.
Features:
- Handlebars Syntax: usage of
{{variable}},{{#each list}},{{#if condition}}. - Rich Input: Full access to the payload as context.
Use Cases:
- Creating a personalized email body: "Hello {{user.name}}..."
- Constructing a complex file path: "/archives/{{year}}/{{month}}/report.pdf"
How it works
- Reads
templateraw from the config: it is not passed through the Expression Engine, so every{{ }}in it belongs to Handlebars. Other config keys are resolved as usual. - Compiles it with Handlebars 4 and renders it with the payload as context:
{{customer.name}},{{#each items}}...{{/each}},{{#if paid}}...{{/if}}. - Returns the payload plus
textthroughout.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-ready-message",
"label": "Ready message",
"operator_slug": "data.template",
"operator_version": "1.0.0",
"config": {
"template": "Hello {{customer.name}}, your order {{order_id}} is ready."
}
}{
"ok": true,
"data": {
"customer": {
"name": "Ana"
},
"order_id": "ord_123",
"text": "Hello Ana, your order ord_123 is ready."
},
"port": "out"
}Configuration
-
templatestring Required -
The text template using Handlebars syntax.
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
template - Only payload fields are visible. Expression Engine variables (
$json,$("Node"),$now,$execution) do not exist here: write{{order_id}}, not{{ $json.order_id }}. An empty template renders"".
Output ports
out default The template rendered.
{
"customer": {
"name": "Ana"
},
"order_id": "ord_123",
"text": "Hello Ana, your order ord_123 is ready."
}error The template has a syntax error.
{
"ok": false,
"errors": [
"Template Error: Parse error on line 1: ..."
],
"port": "error"
}In expressions
What a later node can read from this node's output with $("Render Template").item.json.<path> (write your node's label instead of Render Template). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Render Template").item.json.resultThe rendered string. | — | |
$("Render Template").item.json.customer | — | |
$("Render Template").item.json.customer.name | — | |
$("Render Template").item.json.order_id | — | |
$("Render Template").item.json.text | — |
— Editor: The editor suggests it, but the worker does not return it: it reads as undefined.
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
Template Error: Parse error on line <n>: <details> | error | Invalid Handlebars syntax, such as an unclosed {{#if}} block. |
Input contract
-
payloadobject Optional -
Data context available in the template.
Output contract
-
resultstring Optional -
The rendered string.
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "data.template",
"name": "Render Template",
"category": "data",
"version": "1.0.0",
"description": "Generates dynamic text using the Handlebars templating engine.\n\n This operator allows you to merge data variables into a text template. It is ideal for constructing emails, SMS messages, HTML documents, or SQL queries.\n\n **Features:**\n - **Handlebars Syntax:** usage of `{{variable}}`, `{{#each list}}`, `{{#if condition}}`.\n - **Rich Input:** Full access to the payload as context.\n\n **Use Cases:**\n - Creating a personalized email body: \"Hello {{user.name}}...\"\n - Constructing a complex file path: \"/archives/{{year}}/{{month}}/report.pdf\"",
"capabilities": [
"templating",
"handlebars",
"text-generation"
],
"config_schema": {
"type": "object",
"required": [
"template"
],
"properties": {
"template": {
"type": "string",
"title": "Template String",
"format": "textarea",
"description": "The text template using Handlebars syntax."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": {
"type": "object",
"properties": {
"payload": {
"type": "object",
"description": "Data context available in the template."
}
}
},
"output_contract_schema": {
"type": "object",
"properties": {
"result": {
"type": "string",
"description": "The rendered string."
}
}
},
"ports": [
{
"port_id": "out",
"label": "Rendered",
"is_default": true
},
{
"port_id": "error",
"label": "Error"
}
],
"execution_mode": "sync",
"tags": [
"handlebars",
"html",
"template",
"text"
],
"is_stateful": false,
"publisher": {
"identity": "org_link_loom",
"profile": {
"name": "Link Loom",
"verified": true,
"url": "https://me.veripass.com/link-loom",
"logo_url": null
}
}
}{
"type": "object",
"required": [
"template"
],
"properties": {
"template": {
"type": "string",
"title": "Template String",
"format": "textarea",
"description": "The text template using Handlebars syntax."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"properties": {
"payload": {
"type": "object",
"description": "Data context available in the template."
}
}
}{
"type": "object",
"properties": {
"result": {
"type": "string",
"description": "The rendered string."
}
}
}[
{
"port_id": "out",
"label": "Rendered",
"is_default": true
},
{
"port_id": "error",
"label": "Error"
}
]Execution
- Execution
sync- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
templatinghandlebarstext-generation- Tags
handlebarshtmltemplatetext
Notes and limits
{{ }}escapes HTML characters (&,<,>, quotes); use{{{ }}}for raw output.- Only the built-in Handlebars helpers are available (
if,unless,each,with,lookup,log); no custom helpers are registered. Missing fields render as empty text. - The output key is
text(the output contract saysresult); an existingtextkey is overwritten. - When the envelope has no
data(ordatais falsy), the engine stores the whole envelope as the node output: onerrorthe next node receives{ ok: false, errors: [...], port: "error" }as its payload.
Reviewed against the orchestrator code · 31e874b · 2026-11-26