Edges and Branching
Edges are the connections between nodes. They define how data flows through your workflow and which paths the execution engine follows when it encounters branching logic.
How Edges Work
An edge connects one node's output handle to another node's input handle. When the source node finishes executing, its output data is forwarded along the edge to the target node. The execution engine follows edges to determine the next nodes to run.
Simple nodes have a single output handle, so there is only one path forward. Branching nodes have multiple named output handles, each leading to a different execution path.
{
"source": "node_http_1",
"target": "node_slack_2",
"sourceHandle": null
}Branching with sourceHandle
When a node has multiple output handles, each edge specifies which handle it originates from using the sourceHandle property. The execution engine evaluates the branching condition and only follows the matching handle(s).
If/Else
The If/Else node evaluates a condition and routes data to one of two output handles:
| Handle | Fires When |
|---|---|
true | The condition evaluates to true |
false | The condition evaluates to false |
[
{ "source": "node_if_1", "target": "node_email_2", "sourceHandle": "true" },
{ "source": "node_if_1", "target": "node_log_3", "sourceHandle": "false" }
]Switch
The Switch node matches a value against multiple cases and routes to the first matching case. Each case has a numbered output handle, plus a default handle for unmatched values.
| Handle | Fires When |
|---|---|
case_0 | The value matches the first case |
case_1 | The value matches the second case |
case_N | The value matches the Nth case |
default | No case matched |
[
{ "source": "node_switch_1", "target": "node_a", "sourceHandle": "case_0" },
{ "source": "node_switch_1", "target": "node_b", "sourceHandle": "case_1" },
{ "source": "node_switch_1", "target": "node_c", "sourceHandle": "default" }
]Loop
The Loop node iterates over an array and provides two output handles:
| Handle | Fires When |
|---|---|
loopBody | For each item in the array, data is sent to the loop body branch |
done | After all items have been processed, execution continues to the done branch |
Try/Catch
The Try/Catch node wraps a section of the workflow in error handling with three output handles:
| Handle | Fires When |
|---|---|
try | Normal execution path -- nodes connected here run first |
catch | Error path -- fires if any node in the try branch throws an error |
finally | Always runs after try or catch, regardless of success or failure |
Parallel
The Parallel node splits execution into concurrent branches. Each branch runs independently, and downstream nodes wait for all branches to complete.
| Handle | Description |
|---|---|
branch_0 | First parallel branch |
branch_1 | Second parallel branch |
branch_N | Additional branches as configured |
Visual Labels
NodeLoom color-codes edge labels on the canvas to make complex workflows easy to read at a glance:
| Node Type | Label | Color |
|---|---|---|
| If/Else | true | Green |
| If/Else | false | Red |
| Loop | loopBody | Amber |
| Loop | done | Gray |
| Try/Catch | try | Green |
| Try/Catch | catch | Red |
| Try/Catch | finally | Blue |
Reading complex workflows
How the Execution Engine Follows Edges
The execution engine uses edges to determine the execution order:
- The trigger node produces output and the engine collects all outgoing edges from it.
- For simple nodes, all connected edges are followed. For branching nodes, only the edges matching the active
sourceHandleare followed. - Target nodes of the followed edges are scheduled to run next.
- The engine ensures all nodes at the current stage complete before moving to the next, ensuring dependencies are satisfied.
- Nodes with multiple incoming edges wait until all upstream nodes have completed before executing.
No cycles