CommandType EXECUTION_FLOW; ids are scoped by that type: If-Else is 1100, For is 1101.
Available Commands
If-Else
Run
trueCommands or falseCommands depending on a condition (ID 1100)For
Run a PARSE body, optionally ending in one sink, once per element of a JSON array (ID 1101)
Common Use Cases
- Conditional Parsing: Parse a response differently depending on its shape
- Guarded Delivery: Send to a sink only when a field has an expected value
- Early Close: Close a WebSocket connection only when a stopping condition is met
- Per-element Processing: Transform or deliver each element of an array without creating child Items
Conditional Execution
AND / OR conditions.
Iteration
For expects the previous outputdata to be a bare JSON array. Envelopes such as { "events": [...] } and HTTP parallel { "data": { "aggregatedResults": [...] } } need a PARSE extract onto data first.
Each iteration runs the nested body sequentially. The body holds PARSE commands (not Sleep 1008) and at most one sink, which must be last. HTTP, If-Else, and nested For are not allowed inside the body. The output is { "data": { "aggregatedResults": [...] } }; For does not create Items or set children.
item, index, parent), the 1000-element cap, how failed elements appear in aggregatedResults, and timings.
Best Practices
- Keep branches short: Put shared commands before or after the If-Else rather than duplicating them in both branches
- Set a timeout:
timeoutis required on If-Else and cannot exceed the step’s interval - Test both branches: Use the step test panel with inputs that hit each branch
- Extract before For: Put the array on
datawith a PARSE command first
Related Commands
- Parse Commands - Commands used inside branches and For bodies
- Validation Commands - Stop a step when data is wrong
- WebSocket Close - Close a connection conditionally