Top-Level Structure
Every workflow execution has a single context object with three top-level categories:| Category | Key Examples | Description |
|---|---|---|
| Run Metadata | startDate, status, flowType, appId, versionId, cfProcessId | Identifiers and timestamps for the workflow instance. |
| Execution State | steps, branch, activeSteps, status | Progress and outcome data for each node. |
| Environment & Config | env, agentTimeout, asyncExecDetails | Runtime and environment parameters. |
The steps Object
The steps object is a map that holds the execution state of every node in the workflow, indexed by node name.
| Field | Description |
|---|---|
input | Data received by the node at execution time. |
output | Result produced by the node — model outputs, processed data, or API responses. |
statusCode / isSuccessful | Whether execution succeeded, failed, or was skipped. |
logs | Optional log text or debug messages. |
executionTime, totalTime, pausedAt, resumedAt | Node-level timing data for performance analysis. |
reqObj / resObj | For AI nodes, the raw request and response envelopes. |
metadata | Node-specific information such as schema references, task IDs, or external job handles. |
How steps evolves during execution
The platform populates steps as the workflow runs:
- Initialization — The
stepsobject starts empty. - Node execution — An entry is created for each node as it runs.
- Completion — Outputs and timing data are appended.
- Error handling — Logs and status are updated;
branchreflects failures.
Common Node Types
| Node Type | Typical Fields | Purpose |
|---|---|---|
| Input/Start | user_query, metadata | Captures initial requests. |
| API | body, statusCode, totalTime | Fetches external data. |
| AI | reqObj, resObj, modelElapsedTime | Records prompt and response data. |
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
contextrefers to the full context object.stepsprovides 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
nullor 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
| Field | Type | Description |
|---|---|---|
loopId | String | Unique identifier for the loop node, matching the node ID in your flow. |
startTime | Timestamp | When the loop started executing. |
iterationCount | Number | Number of iterations completed so far. |
inputs | Array | The original list of items the loop processes. |
outputArray | Array of Objects | Results from each iteration, in execution order. |
totalCount | Number | Total number of items to process (same as inputs length). |
childNodesExecuted | Number | Total count of child nodes that ran across all iterations. |
Accessing loop data
Inside the loop — Use iteration-scoped variables:| Variable | Description |
|---|---|
{{context.currentItem}} | The item being processed in the current iteration. |
{{context.currentIndex}} | Zero-based index of the current item. |
{{context.currentOutput[x]}} | Output from a specific previous iteration. |
| Variable | Description |
|---|---|
{{context.steps.Loop0001.output}} | The complete array of all iteration results. |
{{context.steps.Loop0001.output[0]}} | The result from a specific iteration. |
Best Practices
- Use consistent node naming: Names like
QueryGeneratororDataCleanermake 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.