Flow Control
Branching, loops, error handling, delays, and execution routing nodes.
Flow Control nodes determine how execution moves through your pattern. They handle branching, iteration, error handling, timing, and parallel execution. Most Flow Control nodes have an orange header (flow category), though Call Pattern has a green header (action category).
All Flow Control nodes are impure — they have execution pins that control sequencing.
Branch
If/else branching based on a boolean condition.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the branch |
| Condition | Input | Boolean | The condition to evaluate |
| True | Output | Exec | Fires when condition is true |
| False | Output | Exec | Fires when condition is false |
Impure. Use Branch to route execution based on any boolean value — API response status, string comparison, null check.
Switch
Multi-way branch that matches a value against multiple cases.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the switch |
| Value | Input | Any | The value to match against |
| Case 0 | Output | Exec | Fires when value matches Case 0 |
| Case 1 | Output | Exec | Fires when value matches Case 1 |
| Case 2 | Output | Exec | Fires when value matches Case 2 |
| Default | Output | Exec | Fires when no case matches |
Cases are configurable — you can add or remove them in the Inspector Panel. Each case has an associated value to match against.
Impure. Use Switch to route execution based on string or numeric values, like HTTP status codes or event types.
For Each
Iterate over a collection, executing the body once per element.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Starts the loop |
| Collection | Input | Array | The array to iterate over |
| Body | Output | Exec | Fires once per element |
| Completed | Output | Exec | Fires after all elements are processed |
| Item | Output | Any | The current element |
| Index | Output | Integer | The current index (zero-based) |
Impure. Use For Each to process arrays of alerts, IP addresses, user records, or any collection.
For Range
Loop through a numeric range with configurable start, end, and step.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Starts the loop |
| Start | Input | Integer | Starting value (default: 0) |
| End | Input | Integer | Ending value (default: 10) |
| Step | Input | Integer | Increment per iteration (default: 1) |
| Body | Output | Exec | Fires once per step |
| Completed | Output | Exec | Fires after the range is exhausted |
| Index | Output | Integer | The current counter value |
Impure. Use For Range for counted loops — paginating through API results, processing numbered batches.
While
Loop while a condition remains true.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Starts the loop |
| Condition | Input | Boolean | Continue while true |
| Body | Output | Exec | Fires each iteration |
| Completed | Output | Exec | Fires when condition becomes false |
Impure. Use While for loops where the iteration count is unknown — polling until a resource is ready.
Do While
Execute the body first, then check the condition. Guarantees at least one iteration.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Starts the loop |
| Condition | Input | Boolean | Continue while true |
| Body | Output | Exec | Fires each iteration |
| Completed | Output | Exec | Fires when condition becomes false |
Impure. Use Do While when you need the loop body to run at least once before checking the exit condition.
Sequence
Fire multiple execution outputs in order. Each output runs to completion before the next begins.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the sequence |
| Then 0 | Output | Exec | First branch |
| Then 1 | Output | Exec | Second branch |
| Then 2 | Output | Exec | Third branch |
| Then 3 | Output | Exec | Fourth branch |
Impure. Use Sequence to run independent tasks in order from a single entry point — fetch data, then process, then send notification.
Try / Catch
Structured error handling with try, catch, and finally blocks.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Enters the try block |
| Try | Output | Exec | The guarded execution path |
| Catch | Output | Exec | Fires if an error occurs in Try |
| Finally | Output | Exec | Always fires after Try or Catch |
| Error | Output | Object | Error details (message, type, status) |
Impure. Use Try / Catch around HTTP requests or other operations that may fail, so you can handle errors gracefully.
Retry
Retry a block with exponential backoff on failure.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Starts the retry loop |
| Max Attempts | Input | Integer | Maximum number of attempts (default: 3) |
| Delay (s) | Input | Float | Initial delay between attempts (default: 1) |
| Backoff Multiplier | Input | Float | Multiply delay after each attempt (default: 2) |
| Body | Output | Exec | The block to retry |
| Success | Output | Exec | Fires if the body completes without error |
| Failure | Output | Exec | Fires after all attempts are exhausted |
| Attempt | Output | Integer | Current attempt number |
Impure. Use Retry to wrap flaky API calls or transient operations that may succeed on a subsequent attempt.
Timeout
Execute a block with a time limit. Routes to Completed or Timed Out based on whether the body finishes in time.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Starts the timed block |
| Seconds | Input | Float | Maximum time allowed (default: 30) |
| Body | Output | Exec | The guarded block |
| Completed | Output | Exec | Fires if the body finishes in time |
| Timed Out | Output | Exec | Fires if the deadline is exceeded |
Impure. Use Timeout to prevent long-running operations from blocking your pattern indefinitely.
Delay
Pause execution for a specified number of seconds.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the delay |
| Seconds | Input | Float | Duration to pause (default: 1) |
| Exec | Output | Exec | Fires after the delay |
Impure. Use Delay for rate limiting, waiting for external systems to process, or spacing out API calls.
Gate
Stateful gate that only passes execution when open. Use the Open, Close, and Toggle pins to control its state.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Open | Input | Exec | Opens the gate |
| Close | Input | Exec | Closes the gate |
| Toggle | Input | Exec | Toggles the gate state |
| Enter | Input | Exec | Attempts to pass through |
| Exit | Output | Exec | Fires if the gate is open when Enter fires |
| Is Open | Output | Boolean | Current gate state |
Impure. Use Gate to conditionally block or allow execution paths based on runtime state.
Do Once
Execute the downstream path only the first time. Subsequent calls route to Already Done.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the node |
| Exec | Output | Exec | Fires the first time only |
| Already Done | Output | Exec | Fires on subsequent calls |
Impure. Use Do Once for one-time initialization inside loops or repeated event handlers.
Merge
Join two execution branches into a single output.
| Pin | Direction | Type | Description |
|---|---|---|---|
| A | Input | Exec | First branch |
| B | Input | Exec | Second branch |
| Exec | Output | Exec | Fires when either branch completes |
Impure. Use Merge to reconverge after a Branch or Switch before continuing to shared logic.
Filter Guard
Continue execution only if a condition is true. Otherwise route to the Reject path.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the guard |
| Condition | Input | Boolean | The condition to check |
| Pass | Output | Exec | Fires when condition is true |
| Reject | Output | Exec | Fires when condition is false |
Impure. Use Filter Guard for early-exit patterns — stop processing if a prerequisite is not met.
Break
Exit the current loop immediately.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the break |
Impure. Use Break inside a For Each, For Range, or While loop to stop iteration early.
Continue
Skip the rest of the current loop iteration and advance to the next one.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the skip |
Impure. Use Continue inside a loop to skip elements that do not meet a condition.
Return
Exit the current function and optionally return a value.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the return |
| Value | Input | Any | The value to return |
Impure. Use Return to end a function early or to pass a result back to the calling pattern.
Throw Error
Raise an error with a custom message. This interrupts normal execution and can be caught by Try / Catch or On Error.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the error |
| Message | Input | String | Error message text |
Impure. Use Throw Error to signal failure conditions that upstream handlers should deal with.
Batch Process
Process an array in fixed-size chunks with an optional delay between batches.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Starts processing |
| Items | Input | Array | The full array to process |
| Batch Size | Input | Integer | Elements per batch (default: 10) |
| Delay Between (s) | Input | Float | Pause between batches (default: 0) |
| Batch | Output | Exec | Fires once per batch |
| Completed | Output | Exec | Fires after all batches are processed |
| Current Batch | Output | Array | The current chunk of items |
Impure. Use Batch Process to send bulk API requests in manageable chunks without overwhelming rate limits.
For Each Parallel
Iterate over a collection concurrently. Each element runs in parallel, up to a configurable concurrency limit.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Starts the parallel loop |
| Collection | Input | Array | The array to iterate over |
| Throttle Limit | Input | Integer | Max concurrent iterations (default: 5) |
| Body | Output | Exec | Fires once per element (concurrently) |
| Completed | Output | Exec | Fires after all elements finish |
| Item | Output | Any | The current element |
Impure. Use For Each Parallel to speed up independent operations like enriching a list of IP addresses or checking multiple endpoints simultaneously.
Throttle
Iterate over a collection with a controlled delay between each item.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Starts the throttled loop |
| Collection | Input | Array | The array to iterate over |
| Interval (s) | Input | Float | Delay between each item (default: 1) |
| Body | Output | Exec | Fires once per element |
| Completed | Output | Exec | Fires after all elements are processed |
| Item | Output | Any | The current element |
| Index | Output | Integer | The current index (zero-based) |
Impure. Use Throttle to respect API rate limits by spacing out requests at a fixed interval.
Call Pattern
Execute another deployed pattern and return its result.
| Pin | Direction | Type | Description |
|---|---|---|---|
| Exec | Input | Exec | Triggers the call |
| Pattern ID | Input | String | The deployment ID of the pattern to call |
| Input | Input | Object | Data to pass to the called pattern |
| Exec | Output | Exec | Fires when the called pattern completes |
| Result | Output | Any | The return value from the called pattern |
Impure. Use Call Pattern to break large automations into reusable sub-patterns — an enrichment pattern, a notification pattern, or a shared validation step.
Related categories
- Events — triggers that start execution before flow control takes over
- Comparison — produce boolean values for Branch and Filter Guard conditions
- Logical — combine conditions with AND, OR, NOT before branching