Data Flow¶
Understanding how data moves through workflows.
Data Items¶
Data flows through workflows as items. Each item is:
| Property | Description |
|---|---|
json |
Main data payload |
binary |
Binary data (files, images) |
Node Input/Output¶
Every node:
- Receives items from connected upstream nodes
- Processes the items
- Outputs zero, one, or many items
Data Flow Patterns¶
Sequential Flow¶
Each node passes to the next:
Branching¶
One node feeds multiple:
Both B and C receive A's output.
Merging¶
Multiple nodes feed one:
C receives items from both A and B.
Conditional (Switch)¶
Different paths based on conditions:
Item Transformation¶
1:1 Transformation (Set)¶
Each input item produces one output:
Input: [{json: {a: 1}}, {json: {a: 2}}]
↓
Set Node
↓
Output: [{json: {a: 1, b: 10}}, {json: {a: 2, b: 20}}]
Filtering (Filter)¶
Remove items that don't match:
Input: [{json: {status: "active"}}, {json: {status: "inactive"}}]
↓
Filter (status=active)
↓
Output: [{json: {status: "active"}}]
Aggregation (Combine)¶
Multiple items to one:
Input: [{json: {n: 1}}, {json: {n: 2}}, {json: {n: 3}}]
↓
Item Lists (combine)
↓
Output: [{json: {items: [{n: 1}, {n: 2}, {n: 3}]}}]
Expansion (Split)¶
One item to many:
Input: [{json: {items: [1, 2, 3]}}]
↓
Item Lists (split)
↓
Output: [{json: {value: 1}}, {json: {value: 2}}, {json: {value: 3}}]
Accessing Data¶
Current Item¶
Item Index¶
All Input Items¶
Previous Node Output¶
Data Types¶
JSON Data¶
Most data is JSON:
{
"json": {
"string": "text",
"number": 42,
"boolean": true,
"array": [1, 2, 3],
"object": {"nested": "value"}
}
}
Binary Data¶
Files, images, etc.:
{
"json": {"filename": "document.pdf"},
"binary": {
"data": {
"data": "base64-encoded-content",
"mimeType": "application/pdf",
"fileName": "document.pdf"
}
}
}
Multiple Outputs¶
Some nodes have multiple outputs (e.g., Switch):
Data Persistence¶
Data is stored in:
- Execution records - Full input/output for debugging
- Node results - Per-node output data
Example: Complete Flow¶
Start
↓
[{json: {}}] (empty item)
↓
HTTP Request (GET /users)
↓
[{json: {users: [{id: 1, name: "John"}, {id: 2, name: "Jane"}]}}]
↓
Item Lists (split on users)
↓
[{json: {id: 1, name: "John"}}, {json: {id: 2, name: "Jane"}}]
↓
Filter (id > 1)
↓
[{json: {id: 2, name: "Jane"}}]
↓
Set (add greeting)
↓
[{json: {id: 2, name: "Jane", greeting: "Hello, Jane!"}}]
Debugging Data Flow¶
Log Output¶
Use Code node to log:
Check Execution¶
View execution details:
Shows data at each node.