Skip to content

Mapping with expressions

Expressions let you reference values from the current item, previous nodes, or linked items. Use them when a field needs dynamic text, a fallback, or a value nested inside an object.

For most workflows, start with the visual mapping UI. Use expressions when you need more control.

flowchart LR
  Prev["Previous node output"] --> Current["Current node input item"]
  Current --> Expr["Expression"]
  Expr --> Field["Configured field value"]

An expression is evaluated while the node runs. If the node runs for ten items, the expression is evaluated ten times, once for each current item.

Use the current input item when the value should come from the item being processed now.

{{$input.item.json.title}}

If the current item is:

{
"title": "Pricing page",
"url": "https://example.com/pricing"
}

the expression resolves to:

Pricing page

Use a previous node reference when the value should come from a specific earlier step.

{{$("Get Page Metadata").item.json.title}}

This follows item linking where possible, so the workflow uses the previous item related to the current item.

Expressions are useful for prompts, messages, filenames, and API payloads.

Summarize the page at {{$input.item.json.url}}.
Title: {{$input.item.json.title}}

When page data may be missing, include a fallback before passing values to an AI or integration node.

{{$input.item.json.title || "Untitled page"}}

If a node returns nested output, reference the full path.

{{$input.item.json.metadata.description}}

If the shape is uncertain, inspect the previous node output before writing the expression.

  • Prefer clear field names from Edit Fields over long nested expressions.
  • Keep expressions small. If logic grows, use the Code node.
  • Add fallbacks for values extracted from browser pages.
  • Test expressions with more than one item so item linking issues show up early.