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

# Branches and conditions

> Route execution through explicit true and false paths.

The Condition node compares a left value and, when required, a right value. Its result selects exactly one control branch.

## Operators

Condition and Filter share strict equality, existence, null, empty, containment, prefix/suffix, numeric comparison, one-of, array containment, bounded regular-expression, and RFC 3339 date operators. Operators that do not need a right value hide that field.

| Operator family | Appropriate values | Example |
| - | - | - |
| `equals`, `not_equals` | Numbers, booleans, strings, or matching JSON-compatible values | Status equals `200` |
| `contains`, `not_contains` | Text or a collection supported by the resolved value | Subject contains `Invoice` |
| `greater_than`, `less_than` | Comparable numbers or deliberately ordered values | Row count greater than `0` |
| `exists`, `not_exists` | A possibly missing or null-like mapped value | API field exists |
| `starts_with`, `ends_with` | Text | Filename ends with `.csv` |
| `is_null`, `is_not_null`, `is_empty`, `is_not_empty` | Explicit null and empty states | Array is empty |
| `greater_than_or_equal`, `less_than_or_equal` | Numbers | Retry count at least `2` |
| `matches_regex` | String and a pattern up to 1,024 characters | Filename matches a CSV pattern |
| `is_one_of`, `is_not_one_of`, `array_contains` | An explicit candidate array or array value | Status is one of three values |
| `date_before`, `date_after`, `date_between` | RFC 3339 strings | Timestamp falls inside a UTC interval |

```json title="Check an HTTP response" theme={"system"}
{
  "left": "{{nodes.http_request.output.status}}",
  "operator": "equals",
  "right": 200
}
```

Connect the Condition node's **true** handle to the success path and **false** handle to the fallback or notification path. Nodes on the unselected branch receive the `skipped` state and a reason in the execution inspector.

Condition makes one workflow-level decision. To include or remove individual records, use [Filter](https://docs.sndbox.app/nodes/filter.md). To route items to more than two stable named outputs, use [Switch](https://docs.sndbox.app/nodes/switch.md). When branches converge, use [Merge](https://docs.sndbox.app/nodes/merge.md); ordinary multi-edge convergence is rejected as ambiguous.

## Build a complete branch

1. Test the producer and inspect the exact value and type you plan to compare.
2. Draw the control edge into Condition.
3. Map the producer output into `left`; set or map `right` when the operator needs it.
4. Connect both handles, even if the false branch only records or reports why no action was taken.
5. Run once with data that selects true and once with data that selects false.

For a health check, the true branch might show a local success notification while the false branch posts an alert. Keeping both paths visible makes it clear that a skipped alert is an intentional branch result, not a missing execution.

## Compare types deliberately

Use numeric values for greater-than and less-than checks, booleans for boolean output, and strings for text operators. If input arrives as CSV, JSON text, or page text, parse or normalize it before comparing.

Common surprises include comparing the string `"200"` with the number `200`, treating an empty string as a missing field, or applying text containment to an object. The execution inspector shows the resolved left and right values; use that evidence before changing the operator.

## Detect change across runs

For a value that must be compared with the last successful run, use [Compare With Previous](https://docs.sndbox.app/nodes/compare-previous.md). It returns `changed`, `previous`, and `current`, and commits its state only after the entire workflow succeeds.

The first observation is not a change because no earlier successful value exists. Branch on both `changed` and the first-observation context when initial discovery should trigger a separate action.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.