Appearance
Tags
Tags use {% ... %} to control how a workflow template renders. Form logic formulas do not support any tags. Use a conditional form rule when a calculated value should apply only for certain answers.
Conditions: if, unless, and case
if, elsif, and else
liquid
{% if processExecution.status == "completed" %}
This execution is complete.
{% elsif processExecution.status == "failed" %}
This execution needs attention.
{% else %}
Current status: {{ processExecution.status }}
{% endif %}Use elsif, not elseif. Close each if with endif.
| Operator or value | Meaning | Example condition |
|---|---|---|
==, != | Equal, not equal | processExecution.status == "completed" |
>, <, >=, <= | Numeric or ordered comparison | execution.variables.total >= 1000 |
contains | Substring in text, or value in an array | process.tags contains "urgent" |
and, or | Combine conditions | execution.variables.total > 0 and execution.variables.total < 1000 |
nil, null | Missing/null value | execution.variables.reference == nil |
empty | Empty string or collection | process.tags == empty |
blank | Missing, false, empty, or whitespace-only text | execution.variables.reference == blank |
Liquid evaluates and/or expressions from right to left and does not support parentheses for grouping conditions. Use nested if tags for an unambiguous combination. To compare a transformed value, first store the filter result with assign.
contains does not search object properties inside an array of objects. Use where, find, or an expression filter for that.
unless
unless renders when its condition is false. It supports an optional else.
liquid
{% unless process.tags contains "internal" %}
This request can include external recipients.
{% else %}
Keep this request internal.
{% endunless %}case and when
Use case when one value has several possible matches. Separate multiple matches with or or commas.
liquid
{% case processExecution.status %}
{% when "completed" %}Complete
{% when "failed", "cancelled" %}Closed with an exception
{% else %}Open
{% endcase %}Temporary variables: assign and capture
assign stores a value or filtered expression. capture stores the rendered text between its opening and closing tags.
liquid
{% assign heading = process.name | upcase %}
{% capture reference %}{{ process.name }} / {{ processExecution.id }}{% endcapture %}
{{ heading }}
{{ reference }}These variables exist only while that template renders. They do not update form answers, flow-wide execution variables, or stored records. Use the Set Variable node to persist a flow-wide value.
Loops: for, else, break, and continue
liquid
{% for tag in process.tags %}
{{ forloop.index }}. {{ tag }}
{% else %}
No tags were assigned.
{% endfor %}The else branch runs when the collection has no items.
| Loop option | Effect | Example |
|---|---|---|
limit | Maximum items to render | {% for tag in process.tags limit: 3 %} |
offset | Skip the first items, starting at zero | {% for tag in process.tags offset: 1 %} |
reversed | Reverse the iteration order | {% for tag in process.tags reversed %} |
| Range | Iterate over an inclusive number range | {% for number in (1..3) %} |
offset: continue | Continue where an earlier matching loop stopped | {% for tag in process.tags limit: 3 offset: continue %} |
Combine options when needed, and always close the block with endfor.
Inside the block, forloop exposes:
| Property | Meaning |
|---|---|
index, index0 | Current position, one-based or zero-based |
rindex, rindex0 | Remaining position counted from the end, one-based or zero-based |
first, last | Whether this is the first or last iteration |
length | Number of iterations |
continue skips the rest of the current iteration. break ends the loop.
liquid
{% for tag in process.tags %}
{% if tag == "internal" %}{% continue %}{% endif %}
{{ tag }}
{% if tag == "urgent" %}{% break %}{% endif %}
{% endfor %}A Liquid loop only renders text. It does not execute workflow steps or repeat the process.
Alternating output: cycle
cycle advances through its arguments each time it is encountered. An optional group name keeps separate cycles independent.
liquid
{% for tag in process.tags %}
{% cycle "marker": "-", "+" %} {{ tag }}
{% endfor %}Counters: increment and decrement
increment outputs a counter starting at 0, then increases it. decrement starts by outputting -1, then decreases it.
liquid
{% increment item_number %}, {% increment item_number %}
{% decrement reverse_number %}, {% decrement reverse_number %}The first line produces 0, 1; the second produces -1, -2. Counters are separate from assign variables and reset for a new render. They are not suitable for persistent record numbers.
HTML rows: tablerow
tablerow renders HTML table rows and cells from a collection. cols controls the number of columns; limit and offset control which items are included.
liquid
<table>
{% tablerow tag in process.tags cols: 2 %}
{{ tag | escape }}
{% endtablerow %}
</table>Inside the block, tablerowloop supplies index, index0, rindex, rindex0, first, last, length, col, col0, col_first, and col_last. Use this tag in HTML content, not a plain text subject.
Comments and literal content
comment hides its contents from the output:
liquid
{% comment %}Explain the template for its next editor here.{% endcomment %}# is an inline comment tag:
liquid
{% # This note does not appear in the output. %}raw outputs Liquid syntax literally:
liquid
{% raw %}Write {{ process.name }} to insert the process name.{% endraw %}Comments remain in the saved template and can be seen by its editors. Do not use them to store secrets.
Multiple statements: liquid and echo
liquid lets you write several tag statements, one per line, inside a single block. Do not put {% %} around its inner statements. echo outputs a value and supports filters, like an output expression.
liquid
{% liquid
assign heading = process.name | upcase
echo heading
if process.tags contains "urgent"
echo " - URGENT"
endif
%}echo can also be used on its own: {% echo process.name | upcase %}.