PrompteryxBeta
    ⌘K
    PlatformSupport
    Menu
    IntroductionInstall Desktop & extensionQuick StartPlatform Overview
    OverviewWhat you can makeAI Browser Agent in the chatModels and AutoConnectorsSchedulesProjectsExplore and publishingShare linksMemory and SkillsPersonal agent (beta)Welcome, settings and skinsPlans, credits and top-upsPrompteryx DesktopGroups (pilot)Phone app (early access)
    OverviewCreating WorkflowsTesting & DebuggingScheduling
    OverviewGetting StartedCommandsRecordingSettingsStructured OutputParallel AgentsTips & Best Practices
    OverviewInstallationSidebar AgentUsing Attached FilesExecute on Current TabExporting to Visual Studio
    Overview
    OverviewOpen PageClickClick CoordinatesFillExtract TextScreenshotWaitPress KeyFocus ElementBlur ElementSelect TextHighlight ElementSet ViewportGet Bounding BoxScrollHoverSelect OptionAssertionsCookiesEvaluate JavaScriptExample Workflows
    OverviewPrompteryx Browser AgentOpenAI
    OverviewSchedule TriggerWebhook Trigger
    OverviewGoogle SheetsGoogle CalendarConnect Hub (3,000+ apps)Example Workflows
    AI Vision SettingsChrome Automation ProfilesCloud BrowserBrowser Profiles & Persistent ContextVideo RecordingExecution LogsSharing & CollaborationEdit History
    Selectors GuideVariables
    Start hereGet an API keyRun the AI browser agentDrive a cloud browserRun workflows from anywhereUse connected apps (Connect Hub)SDK (TypeScript)CLIMCP for AI assistants
    REST APIWebhooksMCP toolsCloud Browser APICloud Browser quickstartMigrate from Browserbasen8nZapierMake.com

    Need help? Contact Support

    1. Documentation
    2. Nodes
    3. Control Flow
    4. If Condition

    If Condition Node

    Control Flow

    Branch your workflow based on conditions

    Overview

    The If Condition node allows your workflow to make decisions. It evaluates a condition and routes execution to either the "true" branch or "false" branch based on the result. This is essential for building intelligent automations that respond to different scenarios.

    Parameters
    Configuration options for this node
    value1
    Any
    Required

    Value 1: the first value to compare (can be a variable or literal)

    Example: {{status}}, 100, active
    operation
    Select
    Required

    Operation: how to compare the values

    Default: equal
    Example: equal, not equal, contains, greater than, is empty
    value2
    Any

    Value 2: the second value to compare against (not needed for is empty / is not empty)

    Example: success, 50, {{expectedValue}}
    The If Condition config panel in Visual Studio: Value 1, an Operation dropdown set to equal, and Value 2 — each value field accepts a literal or a {{variable}}
    The If Condition config panel — two values and an operator; both fields accept literals or {{variable}} references.

    Comparison Operators

    Equals / Not Equals
    Check if two values are equal or different.status equals "success"
    Greater / Less Than (or Equal)
    Compare numeric values with greater than, greater or equal, less than, or less or equal.price greater than 100
    Contains / Does Not Contain
    Check if text contains a substring.email contains "@gmail.com"
    Starts With / Ends With
    Check string prefixes or suffixes.url starts with "https://"
    Is Empty / Is Not Empty
    Check if a value exists or is empty.errorMessage is empty
    True / False Values
    Use equal with Value 2 set to true (or false). True/false comparisons ignore capitalisation.isLoggedIn equal true

    Usage Examples

    Example 1: Check Login Success
    Branch based on whether login was successful
    Value 1:{{loginResult}}
    Operation: equal
    Value 2:success

    True: Continue to dashboard

    False: Show error, retry login

    Example 2: Check Price Threshold
    Take action only if price is below target
    Value 1:{{currentPrice}}
    Operation: less than
    Value 2:{{targetPrice}}

    True: Send notification, make purchase

    False: Log and wait for next check

    Example 3: Validate Email Domain
    Check if email is from allowed domain
    Value 1:{{userEmail}}
    Operation: ends with
    Value 2:@company.com

    True: Grant access

    False: Deny access, show error

    Combining with Is/Has Nodes

    Using Browser State Checks

    Use Is/Has browser nodes to get boolean values for conditions:

    1. Is Visible? → store result in a variable
    2. If Condition: Check the variable with equal → true
    3. Branch based on element visibility

    Best Practices

    Use Descriptive Node Names
    Rename the first node on each branch clearly (e.g., "Login Successful", "Login Failed") to make the workflow easier to understand and debug.
    Handle Both Branches
    Always connect both the true and false outputs, even if just to log a message. Unconnected branches can cause confusion when debugging.
    Test Both Paths
    When testing, deliberately trigger both the true and false conditions to ensure both branches work correctly.

    Related Documentation

    Assertion Nodes

    Fail workflow on conditions

    For Each Loop

    Iterate through lists

    Variables Guide

    Use data in conditions

    Testing Workflows

    Debug conditional logic