Skip to main content

Scenario Branch Node

The Scenario Branch node evaluates input text against defined conditions and branches the flow accordingly, providing a reason for the decision. This intelligent routing node enables conditional logic in your flows, making it ideal for content classification, automated decision-making, adaptive learning paths, and dynamic workflow routing based on AI analysis.

Scenario Branch node


Basic Usage

Use the Text Input, Display Text, Form Node, Text Join and Scenario Branch for your process.


Overview

Evaluate input text against defined conditions and branches the flow accordingly, providing a reason for the decision.


Inputs

The Scenario Branch node accepts the following input:

Input

  • Type: Text content to be evaluated
  • Mandatory: Required
  • Works best with: Text Input, Form Node, Text Join, AI General Prompt output

The input text will be analyzed by the selected AI model to determine which scenario branch it matches.


Outputs

The Scenario Branch node provides multiple outputs based on defined scenarios:

Reason

  • Type: Text explanation for why a particular branch was selected
  • Works best with: Display Text, Document Download

Provides transparent reasoning for the branching decision, useful for debugging and user feedback.

Scenario Outputs (Dynamic)

  • Type: Flow continuation based on matched scenario
  • Number: One output per defined scenario
  • Works best with: Any downstream node

Each scenario you define creates a separate output connection that activates when that scenario is matched.


Configuration

Model Selection

Select the AI model to use for scenario evaluation:

GPT-4o-mini (Default in screenshot)

GPT-4o-mini is a fast and cost-effective model suitable for most scenario branching tasks, providing reliable classification and reasoning.

Other Available Models

The Scenario Branch node supports various AI models for evaluation. Choose based on your complexity needs and budget:

  • GPT-4o: Advanced reasoning for complex scenarios
  • Claude Sonnet 4.5: Strong analytical capabilities
  • Gemini 2.5 Flash Lite: Fast evaluation for simple branching
  • GPT-3.5: Efficient for straightforward classifications

Scenario Definition

Define scenarios by typing conditions in the text field. Each scenario represents a possible branch in your flow.

Adding Scenarios

  1. Type your scenario condition in the text field
  2. Click "+ Add scenario" to add more branches
  3. Each scenario creates a new output connection
  4. Define clear, distinct conditions for accurate routing

Scenario Examples

  • "Correct Grammar": Routes grammatically correct text
  • "Incorrect Grammar": Routes text with grammatical errors
  • "Positive Sentiment": Routes positive feedback
  • "Negative Sentiment": Routes complaints or criticism
  • "Beginner Level": Routes simple content
  • "Advanced Level": Routes complex content

Example Workflow

Grammar Checker with Conditional Feedback

Scenario: Create a grammar checking tool that provides different feedback based on whether the input contains grammatical errors.

Scenario Branch Example

Steps to Create the Flow:

  1. Add a Start Node.

  2. Add and connect a Text Input for user text submission.

    • Configure Text Box Height: Medium
    • Example input:
    I eat an apple yesterday.
  3. Add and connect a Scenario Branch Node.

    • Select Model: GPT-4o-mini
    • Connect Text Input's Output to Scenario Branch's Input
    • Define Scenario 1: Type "Correct Grammar"
    • Define Scenario 2: Type "Incorrect Grammar"
    • Click "+ Add scenario" after each definition
  4. Add and connect a Display Text for correct grammar.

    • Connect from "Correct Grammar" output
    • Configure to show success message and original text
  5. Add and connect a Display Text for incorrect grammar.

    • Connect from "Incorrect Grammar" output
    • Configure to show error explanation
  6. (Optional) Connect Reason output to a Display Text to show the AI's reasoning.

Result:

When a user inputs text like "I eat an apple yesterday", the Scenario Branch evaluates it and routes to the "Incorrect Grammar" branch. The system displays:

Input: "I eat an apple yesterday."

Analysis: The sentence 'I eat an apple yesterday' contains a grammatical error. The verb 'eat' is in the present tense, while 'yesterday' indicates a past action, which should use the past tense form 'ate'. This inconsistency categorizes the input under 'Incorrect Grammar'.

The AI provides clear reasoning for the classification, enabling appropriate feedback to be delivered through the correct branch.