Skip to content

Syntax and Variables ​

Output, tags, and literal text ​

Liquid has two main delimiters:

SyntaxPurposeExample
{{ ... }}Insert a value into the output{{ process.name }}
{% ... %}Run a tag in a workflow template{% assign title = process.name %}

Everything outside the delimiters is literal text. A form formula supports output expressions and literal text, but does not support tags.

liquid
Request {{ processExecution.id }} belongs to {{ process.name }}.

Do not nest delimiters. Write {{ process.name | upcase }}, not an output expression inside another output expression.

Filters and arguments ​

Put a pipe after a value to transform it. Use a colon before the filter's arguments and commas between arguments.

liquid
{{ process.name | default: "Untitled process" | upcase }}
{{ process.name | replace: "Request", "Case" }}

Filters run from left to right. Each one receives the previous result.

liquid
{{ 10 | plus: 5 | times: 2 }}

This produces 30: add five, then multiply by two. Liquid does not use spreadsheet syntax such as =SUM(...), JavaScript expressions, or ordinary arithmetic such as {{ 10 + 5 }}. Use math filters. To group a calculation in a workflow template, assign an intermediate result; in a form, use another calculated field.

String arguments need single or double quotes. Variable arguments do not:

liquid
{{ process.name | append: " / " | append: processExecution.name }}

Workflow variable roots ​

The variable selector builds the Liquid expression for your selection, so you do not need to type the path yourself. Its choices reflect the fields, nodes, outputs, and compatible variables available in the current setting.

RootContainsExample
processProcess identity, name, tags, and timestamps{{ process.name }}
processVersionCurrent version identity, version number, and timestamps{{ processVersion.version }}
processExecutionCurrent execution identity, name, status, timestamps, and starter when available{{ processExecution.status }}
execution.variablesFlow-wide variables defined for this process{{ execution.variables.reference }}
nodesNode metadata and execution results, keyed by node ID{{ nodes.request_form.latest.status }}
sys.workspaceCurrent workspace information{{ sys.workspace.name }}
sys.appNawfe platform information{{ sys.app.platformName }}
sys.datetimeCurrent date and time in the resolved locale/timezone{{ sys.datetime.now }}
inputCurrent workflow Loop item and position, inside that loop's body{{ input.position }}

execution.variables.reference assumes that you defined a variable named reference. request_form is a sample node ID. Node, page, and field labels are not substitutes for their saved IDs in workflow paths.

Values from earlier forms ​

A simple form answer has this shape:

liquid
{{ nodes.request_form.latest.form.pages.request_page.customer_name.value }}

Replace request_form, request_page, and customer_name with the IDs inserted by your variable picker. Fields inside Columns include the container ID in their path. List fields and structured outputs can expose arrays or additional properties; use the picker for their exact shape.

latest refers to the latest execution result for that node. executions holds its execution history. A node that has not run has no submitted values to read. Keep the workflow path and branching in mind when choosing a source.

Inside a workflow Loop ​

The loop body also has:

PathMeaning
input.itemCurrent item, with the shape of the loop's source data
input.indexZero-based item index
input.positionOne-based item position
input.totalTotal number of items
liquid
Item {{ input.position }} of {{ input.total }}: {{ input.item.name }}

The .name property here assumes an item with that property. This context belongs to the workflow's Loop node. A Liquid {% for %} tag uses its own local item and forloop object instead.

Current date and time ​

PathValue
sys.datetime.nowCurrent ISO datetime
sys.datetime.todayLocalized current date
sys.datetime.timeLocalized current time
sys.datetime.hourOfDayHour, 0–23
sys.datetime.dayDay of week, Monday = 1 through Sunday = 7
sys.datetime.dayNameLocalized weekday name
sys.datetime.monthMonth, 1–12
sys.datetime.monthNameLocalized month name
sys.datetime.quarterQuarter, 1–4
sys.datetime.yearFour-digit year
sys.datetime.isWeekendWhether the current day is a weekend

These values are evaluated when the template renders. For an execution's recorded start time, use processExecution.createdAt.

Objects, arrays, and types ​

Use dots to read properties and square brackets for an array index or quoted property name:

liquid
{{ process.tags[0] }}
{{ execution.variables["reference"] }}

Array indexes start at zero. Use join, map, json, or a for tag to give structured data a useful text representation. Printing an object directly does not reliably produce readable content or valid JSON.

Quoted numbers are strings: "10" is different from the number 10. Use unquoted numbers and booleans for typed comparisons and math arguments. A rendered template produces text; it does not by itself change a typed setting or create an object.

Missing values and defaults ​

A missing variable normally renders as empty text. Workflow templates also ignore unknown filters by default, so a misspelled filter can leave the original value unchanged. Form formulas report unsupported filters during validation. Check the spelling and the filter reference when a transformation appears to do nothing.

liquid
{{ execution.variables.reference | default: "Not assigned" }}

default replaces missing/null values, false, empty strings, and empty arrays. It preserves zero. To preserve a false boolean, pass allow_false: true:

liquid
{{ false | default: true, allow_false: true }}

In conditions, only missing/null values and false are false. Zero, empty strings, and empty arrays are truthy. Test blank or empty explicitly when that is what you mean; see conditions.

Whitespace ​

Add a hyphen next to a delimiter to remove adjacent whitespace:

liquid
Reference: {{- execution.variables.reference -}}

This removes the space after the colon as well as whitespace after the expression. Use trimming carefully in emails and other text where spaces and line breaks carry meaning.

HTML and JSON output ​

Liquid does not automatically HTML-escape inserted values in Nawfe's workflow engine. Use escape for plain text inserted into HTML. strip_html removes markup; it is not an HTML sanitizer.

liquid
<p>Process: {{ process.name | escape }}</p>

For an HTTP JSON body, use json to serialize each inserted value and leave its generated quotes intact:

liquid
{
  "process": {{ process.name | json }},
  "executionId": {{ processExecution.id | json }}
}

Do not add another pair of quotes around {{ process.name | json }}. Use url_encode for a value placed inside a URL query parameter. These workflow-only filters are not available in form formulas.