Skip to main content

Variable nodes

Read and write arbitrary keys in the workflow context using dot notation. Values written here are visible to every later node as {{ <key> }} and survive a suspend/resume.


Set variable

@wf::variables:set · VariableSetNode

FieldTypeNotes
keytextRequired. Dot path to write, e.g. order.status.
valuejsonValue to store. Supports {{ }}.

Output: { "key": "order.status", "value": "shipped" }


Get variable

@wf::variables:get · VariableGetNode

FieldTypeNotes
keytextRequired. Dot path to read.
defaultjsonReturned when the key doesn't exist.

Output: { "value": <value or default> }


Increment variable

@wf::variables:increment · VariableIncrementNode

Adds amount to a numeric value (treating a missing / non-numeric current value as 0) and writes it back.

FieldTypeDefaultNotes
keytextRequired. Dot path to the number.
amountnumber1Use a negative number to decrement.

Output: { "value": <new value> }


Append to variable

@wf::variables:append · VariableAppendNode

Pushes a value onto an array at key, creating the array if needed (a scalar already there is wrapped into an array first).

FieldTypeNotes
keytextRequired. Dot path to the array.
valuejsonValue to append. Supports {{ }}.

Output: { "value": <the full array> }


Remove variable

@wf::variables:remove · VariableRemoveNode

FieldTypeNotes
keytextRequired. Dot path to remove.

Output: { "key": "order.status" }