Flow Studio
Node Outputs Overview
How output data flows out of every workflow node — the output object model, port routing, and how downstream nodes access data via $output.{nodeId}.
What Is a Node Output?
Every node in a Flow Studio workflow produces exactly one output object per execution. This object is a JSON value — it can be a flat record, a nested object, an array, or even a scalar. The engine stores it in ExecutionMemory.nodeOutputs[nodeId] immediately when the node completes.
Downstream nodes can then read this value using the expression syntax $output.{nodeId}. The entire output object is available regardless of which port the execution followed.
Key principle: Port routing (which downstream branch executes) and data access (
$output.{nodeId}) are completely independent. A node's data is always accessible by its ID, even if execution took a different port.
The Two Roles of Node Output
| Role | Mechanism | Description |
|---|---|---|
| Routing | Port key (portKey) | Determines which connected edge(s) are followed next |
| Data access | $output.{nodeId} | Provides the data payload to downstream expression evaluations |
Output Flow Diagram
┌──────────────┐
│ NodeA │
│ Executor │
│ │
│ return │
│ Success( │
│ data, │──→ ExecutionMemory.nodeOutputs["nodeA"] = data
│ portKey │──→ Edge router follows edges from portKey
│ ) │
└──────────────┘
│
│ portKey = "main"
▼
┌──────────────┐
│ NodeB │ Expression: $output.nodeA.amount
│ Executor │
└──────────────┘
Port Types at a Glance
| Port | When It Fires | Typical Use |
|---|---|---|
main | Node completed successfully | Happy path continuation |
error | Node threw an unhandled exception | Error handler branch |
timeout | Node exceeded its timeout setting | Fallback / retry branch |
| custom | Node logic returned a named port key | Conditional / decision branching |
What You Will Learn in This Guide
- The shape of the output object and what
NodeExecutionResult.Success()stores - How to reference output in downstream expressions using
$output.{nodeId} - The four port types and how the edge router uses them
- How conditional ports enable branching without explicit gateway nodes
- Fan-out: connecting one node's output to multiple downstream nodes in parallel
- NodeId naming conventions and how renaming affects your expressions
- What happens when a node produces no output (Skip / null)
Prerequisites: Familiarity with connecting nodes (Guide4_ConnectingNodes) and execution memory (Guide31_ExecutionMemory) will help you get the most from this guide.