Expressions and templates
Every step in a workflow can read the trigger and the steps before it. There are exactly two ways to write that, and knowing which is which saves a lot of head-scratching.
Two flavours
A template is literal text with double-brace holes in it. It produces a string:
Hi {{ trigger.fields.first_name }}, your order {{ steps.lookup.number }} shipped.An expression is a value that starts with =. It produces its real type — a number, a boolean, an object, a list:
=steps.lookup.total
=steps.lookup.total > 100
=trigger.fields.tagsThe rule of thumb: if the field wants prose, write a template. If the field wants a number, a yes/no, or a whole object, write an expression.
You rarely type the = yourself
Fields that expect a value show an expression input, and the editor adds and strips the marker for you. You'll see it in exported graphs and in this guide, but in the UI you're just typing steps.lookup.total.
What's in scope
| Path | What it holds |
|---|---|
trigger | The event that started the run — the record, the webhook body, the schedule tick. |
steps.<node> | The output of an earlier node, by its id. |
now | The current instant. |
today | The current date. |
now and today are always available and are plain values — there's no now() function to call.
Use the field picker
Don't type paths from memory. Every input has a picker that lists what's actually available: the trigger's shape and each earlier step's output, with real sample values where the workflow has run or you've pinned one.
It shows readable labels (Customer Email) and inserts the correct path (trigger.fields.customer_email). Where a node hasn't produced a sample yet, it falls back to the shape learned from previous successful runs — so the picker is useful even before you've tested this branch.
Live preview
As you type an expression, the editor evaluates it against the current sample and shows you the result underneath. A broken expression shows as a failed result, not an error dialog — you're mid-keystroke, and it's expected to be invalid half the time.
Filters
Pipe a value through a filter to transform it. The template language's filters are all available — default, upper, lower, truncate, replace, split, join, length, round, format_number, format_date and more (full reference) — and automation adds the ones that were actually missing:
{{ trigger.due|date_add(7, "days") }} → the date, a week later
=now|date_subtract(30, "minutes") → half an hour ago
{{ order.shipped_at|date_diff(order.created_at, "hours") }}
→ a NUMBER: hours between them
{{ order.total|format_currency("EUR", "de-DE") }}
→ 1.234,57 €
{{ trigger.subject|re_extract("#(\d+)", 1) }}
→ the capture group, or ''Three details that save real debugging:
- Date maths is calendar-correct. 31 January plus one month is 28 February, not 3 March.
date_diffis fractional on purpose. "0.9 days" stays 0.9 so a numeric condition reads it honestly; round it yourself if you want a whole number.re_extractreturns empty, not an error, when nothing matches — so|default("none", true)composes on top of it. Write the pattern as you would in aMatches patterncondition: one backslash (#(\d+)).
Why there's no "Formatter" step
Other tools make you add a node to uppercase a string or reformat a date. Here that belongs on the field itself: pipe it through a filter where you use it. Fewer nodes, and the transformation is visible next to the thing it affects.
When to use Code instead
Expressions are for reading and reshaping values. When you need real logic — a loop with state, a non-trivial algorithm, a library — use the Code node. If an expression is getting long enough that you have to read it twice, that's the signal.
Set fields
If the same expression appears in four places, put it in a Set fields node once and reference steps.set.<name> afterwards. One place to fix when it's wrong, and the canvas documents itself.