> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meridian.surf/llms.txt
> Use this file to discover all available pages before exploring further.

# If statement

> Branch the flow based on conditions.

If statement blocks branch your flow based on conditions you define in the sidebar.

## What it does

Creates one **Branch** child per condition (If, Else if, Else). Connect different block chains to each branch handle on the canvas.

## Configuration

Define conditions in the If statement sidebar. Each condition gets its own **Branch** block on the canvas.

Use **Add else if** for extra cases. The final **Else** branch runs when nothing else matched.

Compare variables, check permissions, or test message content. Use the variable picker in the sidebar for available placeholders.

## Example workflow

1. **Add the If block** — Place it where the flow should split.
2. **Edit conditions** — Set the If expression and optional Else if / Else rows.
3. **Wire each branch** — Connect blocks to the Branch nodes that appear under the If card.

## See also

* [Logic](/builder/action-blocks/logic) — Browse all blocks in the Logic category.
