Linea Docs

Transform Node

Reshape workflow variables using a Jexl expression evaluated against the current state.

Transform Node

The transform node evaluates a Jexl expression to compute a new value from the current workflow state. The result becomes lastOutput for the next node.

Configuration Fields

FieldTypeDescription
transformScriptstringJexl expression to evaluate (primary field)
transformationstringAlias for transformScript (legacy)

If neither is set, the expression defaults to lastOutput (passthrough).

Expression Context

VariableValue
inputvariables.lastOutput — output of the previous node
lastOutputvariables.lastOutput — same as input
variablesFull workflow variables dictionary

Expression Examples

input.items.length
lastOutput.score * 100
variables.count + 1
input.name + " - processed"

The transform node uses Jexl, not JavaScript. It does not support return, arrow functions, map(), filter(), assignments, or other JS-specific syntax. For full code execution, use the Agent node with the run_javascript tool enabled (requires human approval), or the Code node once Pod VM infrastructure is available.

Output

The result of the expression is set as lastOutput and passed to downstream nodes.

Example Config — Extract a field

{
  "transformScript": "input.data.title"
}

Input: { "data": { "title": "Hello World", "body": "..." } } Output: "Hello World"

Example Config — Arithmetic

{
  "transformScript": "lastOutput.count * 2 + 1"
}

On this page