template
Render a string with {{…}} tokens and optional Eta (mode eta) or safe interpolation only
Builds a string. First {{…}} tokens are resolved. With default mode: "eta", the result is then rendered with Eta (in-process JavaScript, not a sandbox). With mode: "safe", only {{…}} interpolation is allowed and Eta tags (<% %>, <%= %>) fail the node.
Mustache templates use {{input.*}} and {{nodes.*}}. Eta can also use it.previous for the wire JSON. Trust model: SECURITY.md. Concepts: How flows work.
Data
| Field | Type | Description |
|---|---|---|
label | string | Optional UI label |
mode | "eta" | "safe" | Default "eta". "safe" rejects Eta tags |
template | string | required |
Input / output
| Value | |
|---|---|
| Execute input | Previous node output (available as Eta it.previous when mode is eta) |
| Output | Rendered string |
Eta context (it) — mode eta only
| Key | Meaning |
|---|---|
it.input | Flow run input |
it.vars | Current vars |
it.nodes | Map of node id → output |
it.previous | Previous node output |
Examples
Safe mustache only
{
"id": "msg",
"type": "template",
"data": {
"mode": "safe",
"template": "Hello {{input.username}}, token={{vars.token}}"
}
}
Eta expression (default mode)
{
"id": "eta",
"type": "template",
"data": {
"mode": "eta",
"template": "Hello <%= it.input.username %>"
}
}
Build a JSON string for a later http body
{
"id": "payload",
"type": "template",
"data": {
"template": "{\"id\":<%= it.previous %>,\"name\":\"{{input.username}}\"}"
}
}
Conditional Eta
{
"template": "<%= it.input.active ? 'on' : 'off' %>"
}