Flow Control
Last updated
Last updated
Flow Controls in Lleverage enable you to create sophisticated workflow logic with conditional branching, loops, and decision-making capabilities. These powerful tools allow you to build dynamic workflows that adapt to different conditions, process lists of data, and handle complex business logic seamlessly.
Branch: Creates conditional logic with If/ElseIf/Else paths that route workflow execution based on specific conditions
Loop: Processes each item in a list or array individually through a repeatable workflow sequence
Get First Available Value: Returns the first non-empty value from a list of options, providing fallback functionality
Repeat: Executes the same actions a specified number of times with counting capability
💡 Flow controls create sub-canvases for their internal logic and can be nested within each other for complex workflow scenarios.
Open the Add Action menu using one of three methods:
Click the "Add Action" button in the top left corner
Click on a connection circle on an existing action card
Click and drag from one action to create a connection
Navigate to Flow Controls:
Select "All" or "Tools" from the categories
Scroll down to find the "Controls" subcategory at the bottom of the panel
Select your desired flow control (Branch, Loop, Get First Available Value, or Repeat)
Configure the specific settings for your selected flow control type
Select "Branch" as your flow control type
Configure the If condition:
Set condition criteria using variables and operators
Examples: variable equals "value"
, number > 10
, text contains "keyword"
Add ElseIf conditions as needed:
Click to add additional conditional paths
Each ElseIf can have unique condition criteria
Conditions are evaluated in order from top to bottom
Configure Else condition for default behavior when no conditions match
Connect each condition path:
Drag from connection points on the right side of each condition
Link to different workflow actions based on your logic needs
⚠️ Branch conditions are evaluated in order - the first matching condition determines the workflow path.
Branch Configuration Example:
Select "Loop" as your flow control type
Configure the Items field:
Select a variable containing a list or array to process
Examples: contact_list
, uploaded_files
, database_records
Can use data from previous workflow actions or external sources
Click Edit Loop button to open the sub-canvas
Build the workflow for processing individual items:
Add actions that work with each list item
Use the loop item variable in your actions
Connect actions in the desired processing sequence
Return to main canvas using breadcrumb navigation
💡 The loop processes each item individually and sequentially until all items are complete.
Loop Processing Flow:
Takes first item from the list
Executes all sub-canvas actions with that item
Moves to next item and repeats
Continues until all items are processed
Workflow continues after loop completion
Select "Repeat" as your flow control type
Configure the Repetitions field:
Enter a specific number (e.g., 3, 10, 100)
Use a variable containing a number
Can be calculated from previous workflow actions
Click Edit Repeat button to open the sub-canvas
Build the workflow to repeat:
Add actions to perform multiple times
Actions execute identically each repetition
Current repetition number available as variable
Return to main canvas using breadcrumb navigation
💡 Repeat is ideal for retry logic, periodic checks, or generating multiple similar outputs.
Repeat Example:
Select "Get First Available Value" as your flow control type
Configure the Inputs section:
Add multiple variables or values to check
Order matters - values are evaluated from top to bottom
First non-empty value will be returned
Specify the Values to evaluate:
Can include variables, direct values, or expressions
Mix different data types as needed
Value Evaluation Process:
Checks first input - returns value if not empty
If empty, moves to second input
Continues through all inputs sequentially
Returns first available (non-empty) value found
Returns null/empty if all inputs are empty
Get First Available Value Example:
Locate Connection Points: Each flow control path has circular connection points on the right side
Drag to Connect: Click and drag from connection point to target action
Multiple Paths: Different conditions can connect to different workflow sequences
Path Convergence: Separate paths can reconnect later in the workflow
Visual Feedback: Connections show as lines between actions
Edit Buttons: Click "Edit Loop" or "Edit Repeat" to open sub-canvas
Breadcrumb Navigation: Use breadcrumbs at top to navigate between canvases
Variable Access: Main workflow variables are available in sub-canvases
Return Navigation: Click main workflow name in breadcrumbs to return
💡 Sub-canvases provide isolated space for flow control logic while maintaining access to parent workflow variables.
Direct Values: Type specific values like numbers, text, or boolean values Workflow Variables: Select variables using @ symbol or {{ }} notation Calculated Values: Use expressions to compute values dynamically External Data: Reference data from forms, APIs, or database queries
Comparison Operators: equals, not equals, greater than, less than, contains Logical Operators: AND, OR, NOT for complex multi-part conditions Data Types: Handle text, numbers, dates, boolean values appropriately Variable References: Use any variable from previous workflow steps
Nested Branches: Place Branch controls inside Loop or Repeat controls Loops within Conditions: Different Branch paths can trigger different Loops Complex Logic Trees: Combine multiple flow controls for sophisticated decision making Variable Scope: Parent variables remain accessible in nested controls
Flow controls create sub-canvases accessible through "Edit" buttons
Variables from parent workflow are available within flow control sub-canvases
Branch conditions evaluate in order (If, then ElseIf conditions, finally Else)
Loop processing handles items individually and sequentially
Repeat executions are identical except for repetition counter variable
Get First Available Value stops at first non-empty value found
Connection points enable visual linking of different workflow paths
Performance impacts increase with large loops or high repetition counts
⚠️ Be mindful of loop sizes and repetition counts as they can impact workflow execution time and resource usage.
Adding Flow Controls:
Select appropriate flow control type based on logic requirements
Configure control parameters (conditions, items, repetitions, values)
Use "Edit" buttons to build internal workflow logic in sub-canvases
Connect flow control paths to different workflow sequences
Test logic with various input scenarios
Flow Control Results:
Branch: Routes execution to different paths based on conditions
Loop: Processes all items and continues with results
Repeat: Completes specified repetitions and continues
Get First Available Value: Returns selected value as workflow variable
Variable Output: Flow control results and internal variables become available for subsequent workflow actions, enabling complex data processing and decision-making throughout your automation.
💡 Flow controls enable robust, adaptive workflows that handle real-world complexity - from simple conditional logic to sophisticated data processing and business rule implementation. Always test your flow control logic with various scenarios to ensure reliable operation.