Waterflai
  • Welcome to Waterflai
  • Getting Started
    • Concepts
    • Quickstart
  • Providers
    • Providers Overview
    • Providers setup
    • AI models
    • Choose the right models
  • Knowledge
    • Knowledge Overview
    • Knowledge connectors
    • Knowledge collections
  • Studio
    • Studio Overview
    • Studio Builders
      • Light Builder
      • Dream Builder
      • Workflow Builder
      • Flow components (nodes)
        • Input Node
        • Output Node
        • LLM model Node
        • Multimodal LLM Node
        • Dall-E 2 (image generation) Node
        • Dall-E 3 (image generation) Node
        • Sora video generation Node
        • Text-to-Speech (TTS) Node
        • Speech-to-Text (STT) Node
        • OCR Node
        • Agent Node
        • Reranker Node
        • Knowledge retrieval Node
        • Vector store insert Node
        • Vector store record delete Node
        • Gitbook loader
        • Notion Database Node
        • Figma Node
        • Webpage scraper Node
        • Sitemap Scraper Node
        • API Request Node
        • Document metadata extraction Node
        • Document metadata update Node
        • Character splitter Node
        • HTML splitter Node
        • Markdown Splitter
        • Calculator tool Node
        • Text as tool Node
        • Knowledge retrieval tool Node
        • Conditional Node
        • Iteration loop Node
      • Testing and Debugging
    • Publishing
    • Integration with API
    • Embedding in website
  • Analytics
    • Analytics Overview
    • Dashboards
    • Logs
  • Administration
    • Organization users
    • Workspace
    • Security and permissions
  • Troubleshooting
    • Support
Powered by GitBook
On this page
  • Overview
  • Configuration Settings
  • Output Ports
  • Best Practices
  • Common Issues and Solutions
  1. Studio
  2. Studio Builders
  3. Flow components (nodes)

Conditional Node

Overview

The Conditional Node enables you to create branching logic in your flows based on variable values. This node evaluates conditions in sequence and directs the flow through different paths depending on which condition is met first. It supports various data types and comparison operations, making it versatile for complex decision-making scenarios.

Usage cost: 1 credit

Configuration Settings

Conditions

Each condition consists of:

  • Variable: Select from available variables in your flow

  • Operator: Choose a comparison operator based on the variable type

  • Value: Enter the value to compare against (not required for empty/not empty checks)

Operator Types

Based on the variable type, different operators are available (contains, starts with, is, is not, is empty, equals, less than, ...

Output Ports

The node provides multiple output ports:

  • One port for each defined condition (IF/ELIF)

  • One default port (ELSE) for when no conditions are met

Output Variables

  • result (string): "true" if any condition matched, "false" if none matched

  • matched_condition_name (string): Name of the matched condition or "Else case (default)"

Best Practices

Condition Organization

  1. Order Matters: Conditions are evaluated in sequence from top to bottom

  2. Default Case: Always consider what should happen when no conditions are met (ELSE case)

Variable Selection

  1. Choose variables that are guaranteed to be available when the node executes

  2. Consider the variable type when planning your conditions

  3. Ensure variable values will be in the expected format

Operator Usage

  1. Use 'Is empty' and 'Is not empty' for null checks

  2. For numerical comparisons, ensure values can be converted to numbers

  3. When using string operations, consider case sensitivity

Common Issues and Solutions

No Conditions Matching

Problem: Flow always goes to ELSE case Solutions:

  • Verify variable values in debug mode

  • Check condition order - first matching condition wins

  • Ensure value comparisons match variable types

Type Mismatches

Problem: Conditions fail due to type mismatches Solutions:

  • Verify variable types before comparison

  • Use appropriate operators for the data type

  • Convert values to correct type if needed

Performance Considerations

  • Add conditions in order of likelihood to match (most common cases first)

  • Use simple conditions when possible

  • Avoid unnecessary complex string operations

PreviousKnowledge retrieval tool NodeNextIteration loop Node

Last updated 3 months ago