This document explains the If-Else node, which creates conditional branches in your workflow based on specific conditions.

Node Inputs

Required Fields

  • Condition Type: The type of comparison to make
  • Condition Value: The value to compare against (when applicable)

Optional Fields

  • Pass Inputs Through: Makes input values of the wrapped node available as outputs

Node Output

  • Evaluated Condition: Boolean (true/false) result of the condition
  • Pass Through Values: Values for both conditions
  • Inputs: Inputs of the wrapped node [If enabled]

Node Functionality

The If-Else node is like a traffic controller for your data. It:

  • Wraps around other nodes
  • Evaluates their outputs
  • Creates two possible paths (true/false)
  • Routes data accordingly

Common Use Cases

  1. Error Handling:
   Condition: Contains "error"
   True Path: Send alert
   False Path: Continue process
  1. Data Validation:
   Condition: Is not empty
   True Path: Process data
   False Path: Skip record
  1. Threshold Routing:
   Condition: Is greater than 1000
   True Path: High priority queue
   False Path: Normal queue

Step-by-Step Usage

  1. Drag If-Else onto canvas
  2. Place target node inside
  3. Set condition type
  4. Connect true/false outputs
  5. Test both paths

Working with Join Paths

The If-Else node is commonly used in conjunction with the Join Paths node to reconnect conditional branches.

Benefits of Using Join Paths with If-Else

  • Eliminates the need for duplicate nodes after conditional branches
  • Maintains cleaner, more maintainable workflows
  • Preserves original data types through the execution path
  • Reduces redundant operations

Implementation Example

Input → If-Else
         ├─ True Path  → Process A →
         └─ False Path → Process B → Join Paths → Continue Workflow

Best Practices

  1. Add Join Paths after conditional logic is complete
  2. Connect both true and false paths to Join Paths inputs
  3. Continue your workflow from the Join Paths output
  4. Test all conditional paths to ensure proper flow

Additional Resources

In summary, the If-Else node, especially when combined with Join Paths, lets you create smart, branching workflows that make decisions based on your data conditions while maintaining clean and efficient processing paths.