Syntax basics
Everything you can write inside {{ }}.
Delimiters
An expression is anything between {{ and }}. The braces are literal:
Hello, {{ $trigger.body.name }}!If the input field has no {{, Flero treats it as a plain string and skips evaluation entirely. So a field like Hello, world is just Hello, world.
Multiple expressions in one field
You can have any number of expression blocks in a single field. Each block is evaluated independently:
{{ $env.HOST }}/api/v{{ $node["Config"].json.version }}/users/{{ $trigger.body.id }}If one block fails (typo in a node name), the others still resolve. The failed block is replaced with [EXPR-ERROR: …], not with empty string, that way the typo is visible in the output.
Whitespace inside a block
Whitespace inside {{ }} is ignored. These are equivalent:
{{ $node["HTTP"].json.body.email }}
{{$node["HTTP"].json.body.email}}
{{
$node["HTTP"].json.body.email
}}This is useful for long, hard-to-read expressions. Break them across lines for clarity.
Literal {{ and }}
If you need literal double-braces (rare, most often when generating templates for other template engines like Mustache or Jinja), wrap them in single braces or use a Code node to assemble the string programmatically. Flero does not currently provide an escape sequence inside {{ }} itself.
What an expression evaluates to
Expressions can resolve to any JSON value:
| Resolved value | How it's substituted |
|---|---|
| String | Inserted verbatim |
| Number | Stringified (42 → "42") |
| Boolean | "true" / "false" |
null |
"null" |
| Array | JSON-encoded ([1,2,3]) |
| Object | JSON-encoded ({"a":1}) |
This matters when you build URLs, log messages, or any string context. If you need an array as an array (not a string), pass it through a field that accepts JSON directly, or use a Data Transform node to construct the surrounding structure.
Path navigation
After the root ($node["X"], $trigger, etc.), use dots for property access and [index] for array access:
$node["List users"].json.users[0].address.city
$trigger.body.items[2].sku
$workflow.metadata.tags[0]Mixed mode is fine:
$node["Search"].json.results[0].highlights[2].textIf any intermediate value is null or missing, the whole expression evaluates to null (and renders as the string "null"). If you want a fallback, use a Code node, an If node, or a future-planned || operator, for now, the cleanest pattern is:
[Upstream] → [Data Transform: map { name: $input.name || "Anonymous" }] → ...Array length
{{ $node["List"].json.items.length }}.length works on arrays and strings.
String methods
A small set of string methods is available:
| Method | Example |
|---|---|
.toLowerCase() |
{{ $trigger.body.email.toLowerCase() }} |
.toUpperCase() |
{{ $trigger.body.code.toUpperCase() }} |
.trim() |
{{ $trigger.body.name.trim() }} |
For richer string operations (regex, replace, substring, etc.) use a Text Processing node, it gives you the full kit with predictable behaviour.
Comparison and logical operators
Inside {{ }}, you can use:
- Arithmetic:
+,-,*,/ - Comparison:
==,!=,<,>,<=,>= - Logical:
&&,||
{{ $trigger.body.amount * 1.2 }}
{{ $trigger.body.amount > 1000 && $trigger.body.country == "US" }}These are evaluated by the expression engine and the result is substituted as a value. For branching on the result, use an If node, which has a richer operator set.
Related
- Referencing data, the
$roots - Functions, what's available beyond
.toLowerCase(), etc. - Debugging expressions
Found something out of date? This page lives in the Flero docs content set.