Logic Components
Logic components control the flow of your automation by routing data based on conditions. They allow you to create branching paths where different actions are taken depending on your data.How Logic Components Work
Logic components evaluate conditions and output data to one of two paths:- True Output: Data flows here when the condition is met
- False Output: Data flows here when the condition is not met
You can leave either output unconnected if you only need one path. For example, only send an alert when a condition is true, and do nothing otherwise.
If-Else V2
Routes data based on text/string comparisons.Configuration
| Field | Description |
|---|---|
| Input Text | The text value to evaluate (supports @ notation) |
| Operator | Comparison operation |
| Match Value | Value to compare against |
| Case Sensitive | Whether comparison is case-sensitive (default: false) |
| Max Iterations | Maximum times this node can execute in a loop (default: 100) |
Operators
| Operator | Description | Example |
|---|---|---|
| equals | Exact match | "Active" equals "Active" → True |
| not equals | Does not match | "Active" not equals "Churned" → True |
| contains | Contains substring | "Hello World" contains "World" → True |
| starts with | Begins with string | "Enterprise Plan" starts with "Enterprise" → True |
| ends with | Ends with string | "user@acme.com" ends with "acme.com" → True |
| regex | Matches regular expression | "ABC-123" regex "^[A-Z]+-\d+$" → True |
Example: Route by Account Status
Configuration:- Input Text:
@account_data.status - Operator:
equals - Match Value:
Active
- Active accounts → True Output
- All other accounts → False Output
Example: Email Domain Check
Configuration:- Input Text:
@contact_email - Operator:
ends with - Match Value:
@competitor.com - Case Sensitive:
false
- Competitor emails → True Output (maybe skip)
- Other emails → False Output (proceed)
Condition V2
Routes data based on conditions evaluated against specific data fields.Configuration
| Field | Description |
|---|---|
| Field | The data field to evaluate (use @ notation) |
| Operator | Comparison operation |
| Value | Value to compare against |
| Max Iterations | Maximum loop iterations (default: 100) |
Operators
| Operator | Description | Example |
|---|---|---|
| equals | Exact match (works with numbers and strings) | @health_score equals 100 |
| not equals | Does not match | @status not equals "Churned" |
| greater than | Numeric comparison, true if field > value | @arr greater than 100000 |
| less than | Numeric comparison, true if field < value | @health_score less than 50 |
| greater than or equal | Numeric comparison, true if field ≥ value | @mrr greater than or equal 10000 |
| less than or equal | Numeric comparison, true if field ≤ value | @days_to_renewal less than or equal 30 |
| contains | For strings, checks substring; for arrays, checks membership | @tags contains "enterprise" |
| starts with | String begins with value | @name starts with "Acme" |
| ends with | String ends with value | @domain ends with ".edu" |
| boolean validator | Checks truthiness of a value | @is_champion boolean validator |
Example: High-Value Account Filter
Configuration:- Field:
@account_data.arr - Operator:
greater than - Value:
100000
- Accounts with ARR > $100K → True Output
- Accounts with ARR ≤ $100K → False Output
Example: Champion Status Check
Configuration:- Field:
@contact_data.is_champion - Operator:
boolean validator - Value:
true
- Champions → True Output
- Non-champions → False Output
Iteration Tracking
Both logic components track how many times they’ve executed within a single flow run. This prevents infinite loops when your flow has cycles.How It Works
- Each execution increments the iteration counter
- When
max_iterationsis reached, the component outputs to a default path - The counter resets at the start of each new flow run
Configuration
| Field | Description |
|---|---|
| Max Iterations | Maximum executions before forcing default output (default: 100) |
Common Patterns
Pattern: Multiple Conditions
Chain conditions for complex logic:Pattern: Multi-Way Routing
Use multiple conditions to create several paths:- First If-Else: Check for “Active” → True goes to Path A
- Second If-Else (on False output): Check for “At Risk” → True goes to Path B, False goes to Path C
Pattern: Null/Empty Check
Check if a field has a value before using it: Configuration:- Field:
@account_data.owner_email - Operator:
not equals - Value: “ (empty string)
Pattern: Numeric Ranges
For range checks, chain two conditions:Best Practices
Start with simple conditions
Start with simple conditions
Begin with straightforward true/false logic. Add complexity only when needed.
Use descriptive node names
Use descriptive node names
Rename condition nodes to describe what they check: “Is High Value?” or “Has Champion Contact?”
Handle both paths
Handle both paths
Even if you only care about one outcome, consider what should happen on the other path. At minimum, add logging.
Test edge cases
Test edge cases
Test your conditions with:
- Empty/null values
- Boundary values (exactly 100K when checking > 100K)
- Different data types (string “100” vs number 100)
Document complex logic
Document complex logic
For multi-condition flows, add comments or descriptions explaining the overall logic.
Troubleshooting
Condition always goes to False
Condition always goes to False
- Check that the field path is correct (use @ notation)
- Verify the data type matches (string vs number)
- Test the node individually to see the actual input values
- Check case sensitivity settings
Unexpected True results
Unexpected True results
- Empty strings may evaluate differently than expected
- Check for whitespace in string comparisons
- Verify the operator matches your intent
Max iterations reached
Max iterations reached
- Look for loops in your flow
- Check if a condition is always routing back to itself
- Increase max_iterations if the loop is intentional and bounded
Next Steps
Processing Components
Transform data before conditions
Testing Flows
Test your conditional logic