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.

Simple edge (single output)
{
  "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:

HandleFires When
trueThe condition evaluates to true
falseThe condition evaluates to false
If/Else edges
[
  { "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.

HandleFires When
case_0The value matches the first case
case_1The value matches the second case
case_NThe value matches the Nth case
defaultNo case matched
Switch edges
[
  { "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:

HandleFires When
loopBodyFor each item in the array, data is sent to the loop body branch
doneAfter 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:

HandleFires When
tryNormal execution path -- nodes connected here run first
catchError path -- fires if any node in the try branch throws an error
finallyAlways 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.

HandleDescription
branch_0First parallel branch
branch_1Second parallel branch
branch_NAdditional branches as configured

Visual Labels

NodeLoom color-codes edge labels on the canvas to make complex workflows easy to read at a glance:

Node TypeLabelColor
If/Elsetrue Green
If/Elsefalse Red
LooploopBody Amber
Loopdone Gray
Try/Catchtry Green
Try/Catchcatch Red
Try/Catchfinally Blue

Reading complex workflows

When reviewing an unfamiliar workflow, start at the trigger and follow the green (success) paths to understand the happy path. Then trace the red (error/false) paths to understand failure handling.

How the Execution Engine Follows Edges

The execution engine uses edges to determine the execution order:

  1. The trigger node produces output and the engine collects all outgoing edges from it.
  2. For simple nodes, all connected edges are followed. For branching nodes, only the edges matching the active sourceHandle are followed.
  3. Target nodes of the followed edges are scheduled to run next.
  4. The engine ensures all nodes at the current stage complete before moving to the next, ensuring dependencies are satisfied.
  5. Nodes with multiple incoming edges wait until all upstream nodes have completed before executing.

No cycles

NodeLoom enforces a cycle-free structure. The canvas editor prevents you from creating edges that would form a cycle. Use the Loop node for iteration instead.