Skip to main content
The context object is the central runtime state container for every workflow execution. It stores inputs, intermediate data, node-level status, final outputs, and metadata needed for debugging and session rehydration.

Top-Level Structure

Every workflow execution has a single context object with three top-level categories:

The steps Object

The steps object is a map that holds the execution state of every node in the workflow, indexed by node name.
Each node entry contains: Example node structure:

How steps evolves during execution

The platform populates steps as the workflow runs:
  1. Initialization — The steps object starts empty.
  2. Node execution — An entry is created for each node as it runs.
  3. Completion — Outputs and timing data are appended.
  4. Error handling — Logs and status are updated; branch reflects failures.

Common Node Types

Cross-Node Referencing

Nodes reference each other’s data using the {{ }} syntax. Values resolve at runtime. Example: Pass the schema output from one node as input to the next.

Supported reference patterns

  • context refers to the full context object.
  • steps provides scoped access to individual node data.
  • References work in input fields, API node parameters, LLM prompts, and conditions.

Evaluation behavior

  • Lazy evaluation — Values resolve immediately before the node executes.
  • Missing keys — If a referenced key doesn’t exist, the expression resolves to null or an empty string in string contexts.
  • Circular references — Automatically detected and blocked.

Extending Context with Script Nodes

Use Script Nodes to add or modify context keys dynamically. Any key you add is accessible in later nodes using {{context.<key>}}.

Guidelines

  • Use camelCase naming — for example, customerInfo, retryCounter, tempResults.
  • Don’t override system-reserved keys: steps, branch, status, dbquery.
  • Keep data lightweight — avoid storing large arrays or raw API responses.

Loop Node Context

When a Loop Node executes, it creates its own context object that tracks iteration progress and results. This object is accessible throughout the workflow.

Structure

Accessing loop data

Inside the loop — Use iteration-scoped variables: Outside the loop — Access results using the loop node’s ID: Example: Processing a list of email addresses.

Best Practices

  • Use consistent node naming: Names like QueryGenerator or DataCleaner make context references traceable and readable.
  • Mask sensitive data: Don’t write credentials or PII directly to the context object.
  • Prefer declarative references: Use {{context.<key>}} syntax wherever possible. Reserve Script Nodes for computed or dynamic values.
  • Keep context data lightweight: Avoid storing large arrays or raw API payloads.