Nodes2Cloud Docs
Docs/Workflow Engine

Expression Syntax & Data Flow

Nodes2Cloud uses a clean, safe JavaScript-subset expression engine to map and transform data between steps without requiring full boilerplate scripts.

How Data Moves Through Nodes

Every node execution receives the output payload of its incoming connection as $json. The output is structured as standard JSON. Downstream nodes can either consume this immediate input or reach back to any earlier node in the DAG using $node["NodeName"].

Common Expression Patterns

Direct Current Step InputJS Expression
$json.user.email

Accesses the 'email' property inside the 'user' object of the immediate predecessor node.

Explicit Upstream Node ReferenceJS Expression
$node["Webhook Trigger"].json.headers["x-signature"]

Retrieves headers from the original Webhook Trigger, even several steps downstream.

String Template InterpolationJS Expression
"Welcome {{ $json.name }}, your order #{{ $json.order_id }} is confirmed!"

Interpolates dynamic values into messages for Slack, Email, or Discord notifications.

Safe Nullish FallbackJS Expression
$json.contact.phone ?? "No phone provided"

Safely handles optional properties without throwing runtime exceptions.

Array Mapping & FilteringJS Expression
$json.items.map(i => i.price * i.quantity).reduce((a, b) => a + b, 0)

Performs standard JavaScript array operations and mathematical reductions.

Standard Globals

VariableTypeDescription
$jsonRecord<string, any>Output payload from the immediate predecessor node.
$node["Name"]StepExecutionResultHistorical output of any named upstream node in the execution branch.
$envRecord<string, string>Workers environment variables and secrets configured for this deployment.
$nowDateCurrent ISO timestamp of workflow execution.

Pure Compilation Invariant

Expressions compile to plain JavaScript inside your Worker bundle. There is no runtime expression engine and no eval(): what runs is the code you can read in the compiled output.

early access

Join the waitlist

We’re opening Nodes2Cloudin batches. Leave your details and we’ll email you when it’s your turn.

We’ll only use this to contact you about access. See our privacy policy.