---
title: "If"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/nodetool/control/if
markdown: https://docs.nodetool.ai/nodes/nodetool/control/if.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/nodetool/control/if.md
---

# If

**Type:** `nodetool.control.If`

**Namespace:** `nodetool.control`

## Description

Conditionally executes one of two branches based on a condition.
    control, flow, condition, logic, else, true, false, switch, toggle, flow-control

    Use cases:
    - Branch workflow based on conditions
    - Handle different cases in data processing
    - Implement decision logic

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| condition | `bool` | The condition to evaluate | `false` |
| value | `any` | The value to pass to the next node | `[]` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| if_true | `any` |  |
| if_false | `any` |  |

## Related Nodes

Browse other nodes in the [nodetool.control](./) namespace.
