> For the complete documentation index, see [llms.txt](https://craft-agent.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://craft-agent.gitbook.io/home/node-reference/conditional-logic.md).

# Conditional Logic

The Conditional node lets you branch your workflow based on conditions, directing data down different paths.

## Settings

| Setting       | Description                                               |
| ------------- | --------------------------------------------------------- |
| **Condition** | The rule to evaluate (e.g., contains "yes", length > 100) |

## Inputs

| Port      | Type | Description          |
| --------- | ---- | -------------------- |
| **Input** | Text | The data to evaluate |

## Outputs

| Port      | Type | Description                                 |
| --------- | ---- | ------------------------------------------- |
| **True**  | Text | Data passes through if condition is met     |
| **False** | Text | Data passes through if condition is NOT met |

## Example

```
[Agent: "Is this text positive or negative? Reply with only 'positive' or 'negative'"]
    → [Conditional: contains "positive"]
        → True: [AI: "Write a thank you response"]
        → False: [AI: "Write an empathetic response"]
```

***

> **Tip:** Use AI to classify or evaluate data before the conditional node. This makes conditions simpler and more reliable.
