Skip to main content

Map data into a node's fields

Use the reference picker and per-field expressions to pass trigger and upstream-step output into the fields of a downstream node.

Goal

Pass a value from your trigger or an earlier step into a field on a later node. For example, take the email address from a form submission and drop it into the "To" field of a send-email action, or take an order ID from a webhook and put it into an HTTP node's URL.

You map data per field. Each configurable field on a node accepts an expression that points at upstream output, so you wire fields one at a time rather than drawing lines on a separate mapping screen.

When to use this

Use per-field mapping whenever a node needs a value that an earlier node produced: the trigger payload, the output of any prior step, or the current node's own input. Reach for the reference picker when you want to browse the exact field paths that are available, and write expressions by hand once you know the shape.

If you need to reshape data first, for example rename keys, merge two objects, or convert a string to a number, add a Transform node upstream and map its output forward. See Control flow nodes for routing, and Expressions for the full alias and syntax reference.

What you can reference

Every mappable field reads from the same set of scopes. The reference picker groups them under these labels:

ScopePoints at
$triggerThe trigger node's output payload.
$stepsThe output of every prior node, keyed by node ID, as { data, meta }.
$inputThe current node's input payload.
$metaEngine metadata such as routing decisions.

Inside a Loop node configured for array iteration, two more bindings become available within the loop body: $currentItem (the current array element) and $currentIndex (its zero-based position).

$vars is reserved, not yet usable

The picker lists a $vars scope labeled "Run-scoped variables (coming in Stage 4)". It currently resolves to an empty object, so do not map fields from it yet.

Pin upstream output first

The reference picker only shows the real field paths it can read from a step's pinned test output. A step has no pinned output until you run its test once, so map in this order:

  1. Test the upstream node

    Open the node whose output you want to map from, configure it, then click its test button (its label matches the node, for example "Test switch" or "Test loop"). TaskJuice runs the step for real and pins the result to that node. The node must be valid before the test button fires.

  2. Open the field you want to map into

    Select the downstream node and open its configuration panel. Click into the field that needs the upstream value, for example the "To" field on a send-email action.

  3. Open the reference picker

    Click the data-reference button on the field (labeled "Insert data reference"). A search popover opens with the placeholder "Search references...". References are grouped by scope: $input, $meta, $steps, $trigger, and $vars, plus any active loop bindings.

  4. Pick the field path

    Browse to the value you want. Step fields render as a path like Send Email > data > email. Type in the search box to filter. Select an entry to insert its expression into the field.

  5. Verify the inserted expression

    The field now holds an expression such as $trigger.email or $steps.action1.data.id. Leave it as is, or extend it with JSONata, for example $steps.action1.data.total * 1.1.

If you skip the test step, the picker shows the scope headers but no concrete field paths under a node, because nothing is pinned to read from.

Reference a specific step's output

Each prior node appears under $steps, keyed by its node ID, and exposes two halves:

  • .data is the node's output payload, for example $steps.action1.data.result.
  • .meta is engine metadata for that node, for example $steps.branch1.meta.routing.

Node IDs that contain only letters, digits, and underscores can be referenced directly. IDs with hyphens or spaces must be wrapped in backticks:

$steps.action1.data.id
$steps.`send-email`.data.messageId

The picker handles this quoting for you when you insert a reference, so you only need the backtick form when you type a step path by hand.

Map fields inside an array loop

When the current field sits inside a Loop node set to Array Iteration, map from the item being processed rather than the whole array:

$currentItem.email
$currentItem.lineItems[0].sku
$currentIndex

$currentItem and $currentIndex are only bound inside the loop body. Referencing them anywhere else fails with SCOPE_BINDING_OUT_OF_SCOPE: "This identifier is not bound at the current cursor position. Move the reference inside the scope-introducing node's body, or remove it."

Reshape data with a Transform node

When the value you need does not exist in any single upstream field, add a Transform node before the consuming node, build the shape you want, then map the Transform node's output forward with $steps.

The Transform node builds its output from a list of operations. The available operations are:

Calculate, Concatenate, Copy, Flatten, Lower Case, Merge, Remove, Rename, Replace, Round, Set, Set If, To Boolean, To Date, To Number, To String, Trim, Upper Case.

A few defaults to know: Concatenate joins with a single space by default, Merge does not overwrite existing keys unless you turn that on, Replace treats the search value as plain text (not a regular expression) by default, Calculate defaults to addition, and Flatten collapses up to 10 levels deep joining keys with a dot.

Verify it worked

Test the consuming node after you finish mapping. Click its test button and read the returned output:

  • A successful test returns the node's real output. Confirm the mapped value landed where you expected, for example that the "To" field resolved to the trigger's email address.
  • An empty expression is a no-op: the node returns its output unchanged. If a field looks blank, check that you actually inserted a reference.

Troubleshooting

SymptomCauseFix
No field paths under a node in the pickerThat upstream node has no pinned test outputOpen the upstream node and run its test once, then reopen the picker.
MISSING_NODE: "Referenced step ID not found in execution context."The step you referenced has not run before this oneMake sure the referenced step is upstream and completes first.
MISSING_PATH: "The referenced step exists but the specified path was not found in its output."The field path is wrong or the upstream shape changedReinsert the path from the picker after re-testing the upstream node.
NULL_RESULT: "Expression evaluated to null or undefined."The expression resolved to nothingA returned null or undefined is treated as an error. Point at a value that exists, or add a fallback in the expression.
INVALID_SYNTAX: "Expression contains a syntax error and could not be compiled."The hand-typed expression is malformedFix the JSONata syntax. The inline diagnostics in the editor flag where it breaks.
SCOPE_BINDING_OUT_OF_SCOPE$currentItem or $currentIndex used outside a loop bodyMove the reference inside the Loop node's body, or remove it.

Limits

  • The picker extracts field paths up to 5 levels deep from pinned output. Values nested deeper than that will not appear as ready-made picker entries, though you can still type the full path by hand.
  • Arrays expose both projection paths (items.id) and a concrete sample path (items[0].id) so you can map either the whole column or one element.
  • Picker contents reflect the last pinned test output. If the upstream shape changes, re-test that node to refresh the available paths.
  • Expressions for every alias, scope binding, and the JSONata syntax you can write in a field.
  • Control flow nodes for Branch, Switch, Loop, and Parallel, including where loop bindings apply.
  • Test a node and publish for the test-then-publish flow that pins the output your mappings read from.
Was this helpful?