Overview
Control flow blocks manage the execution logic of your pipeline:- IfElse: Conditional branching
- Loop: Iteration over lists or repetition
- Delay: Add pauses between operations
- CaseSwitch: Multi-branch selection
- SetVariable: Store values in variables
- Script: Execute custom JavaScript
- Log: Output debugging messages
IfElse
Execute different block sequences based on a condition.Settings
Condition to evaluate (same format as KeyCheck conditions)
Blocks to execute when condition is true
Blocks to execute when condition is false
Example
Loop
Iterate over lists or repeat blocks multiple times.Settings
Type of loop:
ForEach- Iterate over list itemsRepeat- Repeat N times
Variable containing list to iterate (for ForEach)
Variable name for current item (accessible as
data.{item_var})Number of iterations (for Repeat)
Blocks to execute in each iteration
ForEach Example
Repeat Example
Delay
Pause execution for a random or fixed duration.Settings
Minimum delay in milliseconds
Maximum delay in millisecondsThe actual delay is randomly selected between min_ms and max_ms
Examples
CaseSwitch
Multi-branch selection based on input value (like switch/case).Settings
Variable to match against
Array of case branchesEach branch has:
match_value: Value to matchresult_value: Output value if matched
Default value if no cases match
Variable name to store result
Capture as user-visible variable
Example
SetVariable
Store a value in a variable.Settings
Variable name (without
data. prefix)Value to store (supports variable interpolation)
Capture as user-visible variable
Examples
Script
Execute custom JavaScript code for complex logic.Settings
JavaScript code to executeAvailable variables:
data- Access to all pipeline variablesinput- Access to input variables- Return value is stored in output_var
Variable name to store return value
Capture as user-visible variable
Example
Log
Output messages to the console for debugging.Settings
Message to log (supports variable interpolation)
Example
Best Practices
- Use IfElse sparingly - KeyCheck often handles branching better
- Limit loop iterations - Large loops can slow down pipelines
- Add delays between requests - Prevent rate limiting
- Use descriptive variable names in SetVariable
- Test scripts thoroughly - JavaScript errors halt execution
- Use Log blocks for debugging complex pipelines