Lleverage Documentation
WebsiteLegalPlatform
  • Get Started
    • Introduction
    • Co-Pilot
    • FAQ
  • Key Terms
  • Action Guide
    • Triggers
    • Output
    • AI
      • Prompt
      • Agents
      • AI Web Search
      • Generate Image
  • Extracting Information
  • Using Information
  • Custom Code
  • Subworkflows
  • Knowledge Bases
  • Integrations
    • Gmail
    • Outlook
    • Slack
    • Microsoft Teams
    • Google Calendar
    • Sharepoint
    • Google Drive
    • Dropbox
    • Trello
    • Asana
    • Notion
    • ClickUp
    • Jira
    • Linear
    • Hubspot
    • Google Sheets
  • Canvas Guide
    • Canvas Controls
    • Flow Control
    • Action Cards
    • Action Connections
    • Variables and Data Flow
  • The Run Panel and Testing
  • Error Handling
  • Publishing Guide
    • How to Publish
    • API Endpoint
    • Chat App
    • Form App
    • Integration Configuration
    • Scheduling Workflows
  • Sharing
  • Settings
    • Account Setup
  • Projects
  • Subscription Management
  • Sharing & User Permissions
  • Technical
    • Models
    • Security & Performance
  • Analytics & Monitoring
  • Support
    • Release Notes
      • April 2025
      • March 2025
      • February 2025
      • January 2025
      • December 2024
      • November 2024
      • October 2024
      • September 2024
      • August 2024
      • July 2024
    • Getting Help and Troubleshooting
Powered by GitBook
On this page
  • Flow Control Types
  • How to Add Flow Controls
  • How to Configure Flow Controls
  • Flow Control Connections
  • Advanced Flow Control Techniques
  • Important Considerations
  • Flow Control Workflow Integration
  1. Canvas Guide

Flow Control

Last updated 7 days ago

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.

Flow Control Types

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.

How to Add Flow Controls

  1. 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

  2. Navigate to Flow Controls:

    • Select "All" or "Tools" from the categories

    • Scroll down to find the "Controls" subcategory at the bottom of the panel

  3. Select your desired flow control (Branch, Loop, Get First Available Value, or Repeat)

  4. Configure the specific settings for your selected flow control type

How to Configure Flow Controls

How to Configure a Branch

  1. Select "Branch" as your flow control type

  2. Configure the If condition:

    • Set condition criteria using variables and operators

    • Examples: variable equals "value", number > 10, text contains "keyword"

  3. 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

  4. Configure Else condition for default behavior when no conditions match

  5. 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:

If: customer_tier equals "Premium"
→ Connect to: Premium support workflow

ElseIf: order_value > 1000  
→ Connect to: Bulk discount workflow

Else: (default case)
→ Connect to: Standard processing

How to Configure a Loop

  1. Select "Loop" as your flow control type

  2. 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

  3. Click Edit Loop button to open the sub-canvas

  4. 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

  5. Return to main canvas using breadcrumb navigation

💡 The loop processes each item individually and sequentially until all items are complete.

Loop Processing Flow:

  1. Takes first item from the list

  2. Executes all sub-canvas actions with that item

  3. Moves to next item and repeats

  4. Continues until all items are processed

  5. Workflow continues after loop completion

How to Configure a Repeat

  1. Select "Repeat" as your flow control type

  2. 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

  3. Click Edit Repeat button to open the sub-canvas

  4. Build the workflow to repeat:

    • Add actions to perform multiple times

    • Actions execute identically each repetition

    • Current repetition number available as variable

  5. Return to main canvas using breadcrumb navigation

💡 Repeat is ideal for retry logic, periodic checks, or generating multiple similar outputs.

Repeat Example:

Repetitions: 5
Sub-canvas contains:
→ API health check
→ Log results
→ Wait 30 seconds

Result: Performs health check 5 times with 30-second intervals

How to Configure Get First Available Value

  1. Select "Get First Available Value" as your flow control type

  2. 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

  3. Specify the Values to evaluate:

    • Can include variables, direct values, or expressions

    • Mix different data types as needed

Value Evaluation Process:

  1. Checks first input - returns value if not empty

  2. If empty, moves to second input

  3. Continues through all inputs sequentially

  4. Returns first available (non-empty) value found

  5. Returns null/empty if all inputs are empty

Get First Available Value Example:

Inputs (evaluated in order):
1. user_mobile_phone
2. user_work_phone
3. user_home_phone
4. "555-0000" (default)

Result: Returns first available phone number or default

Flow Control Connections

How to Connect Flow Paths

  1. Locate Connection Points: Each flow control path has circular connection points on the right side

  2. Drag to Connect: Click and drag from connection point to target action

  3. Multiple Paths: Different conditions can connect to different workflow sequences

  4. Path Convergence: Separate paths can reconnect later in the workflow

  5. Visual Feedback: Connections show as lines between actions

How to Navigate Sub-Canvases

  1. Edit Buttons: Click "Edit Loop" or "Edit Repeat" to open sub-canvas

  2. Breadcrumb Navigation: Use breadcrumbs at top to navigate between canvases

  3. Variable Access: Main workflow variables are available in sub-canvases

  4. 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.

Advanced Flow Control Techniques

Variable Input Methods

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

Condition Building

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

Nesting Flow Controls

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

Important Considerations

  • 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.

Flow Control Workflow Integration

Adding Flow Controls:

  1. Select appropriate flow control type based on logic requirements

  2. Configure control parameters (conditions, items, repetitions, values)

  3. Use "Edit" buttons to build internal workflow logic in sub-canvases

  4. Connect flow control paths to different workflow sequences

  5. 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.

Branch Action
Loop Action
Get First Available Value Action
Repeat Action