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

# Condition

The Condition block allows you to split your flow in two based on a condition.

<Frame caption="This can be translated to: &#x22;If Score is greater than 20 then go to this path. Otherwise, go to the other path.&#x22;">
  <img src="https://mintcdn.com/typebot/bR67_tMY0NAThQSS/images/blocks/logic/condition.png?fit=max&auto=format&n=bR67_tMY0NAThQSS&q=85&s=2004b01c13a79e93b2cd6d0abcad0b48" alt="Condition" width="2206" height="1582" data-path="images/blocks/logic/condition.png" />
</Frame>

A condition can contain different comparisons that are evaluated in order and linked with a logical operator: 'AND' or 'OR'.

<div className="relative" style={{ paddingBottom: '64.5933014354067%' }}>
  <iframe title="Condition block tutorial video" src="https://www.youtube.com/embed/47KyLHzdpnY" allowFullScreen className="absolute top-0 left-0 w-full h-full" />
</div>

## Operators

<ResponseField name="Equal to">
  Will match if the provided value is strictly equal to the value.
</ResponseField>

<ResponseField name="Not equal">
  Will match if the provided value is not equal to the value.
</ResponseField>

<ResponseField name="Contains">
  Will match if the provided value contains the value. If a list is provided, it
  will match if the list has at least one element in common with the value.
</ResponseField>

<ResponseField name="Does not contain">
  Same as `Contains` but will match the inverse.
</ResponseField>

<ResponseField name="Greater than">
  Will match if the provided value is greater or equal than the value. If the
  variable you provided is a list, it will execute the condition on the length
  of the list.
</ResponseField>

<Frame>
  <img src="https://mintcdn.com/typebot/bR67_tMY0NAThQSS/images/blocks/logic/length-check.png?fit=max&auto=format&n=bR67_tMY0NAThQSS&q=85&s=32a50d2c2eb21a0b2b1df7d95fcf0afc" alt="Condition" width="1276" height="944" data-path="images/blocks/logic/length-check.png" />
</Frame>

<ResponseField name="Less than">
  Will match if the provided value is less or equal than the value. If the
  variable you provided is a list, it will execute the condition on the length
  of the list.
</ResponseField>

<ResponseField name="Is set">
  Will match if the provided value is not null or undefined and not an empty
  string.
</ResponseField>

<ResponseField name="Is empty">
  Will match if the provided value is null, undefined, or an empty string.
</ResponseField>

<ResponseField name="Starts with">
  Will match if the provided value starts with the value.
</ResponseField>

<ResponseField name="Ends with">
  Will match if the provided value ends with the value.
</ResponseField>

<ResponseField name="Matches regex">
  Value should start and end with `/` and contain a valid regex pattern.

  Example:

  * `/^hello$/` will match if the string is strictly equal to "hello".
  * `/hello/` will match if the string contains "hello". Like "hello world".
  * `/hello/i` will match if the string contains "hello" case-insensitive. Like "Hello world".
  * `/[0-9]+/` will match if the string contains one or more digits. Like "123".
</ResponseField>

<ResponseField name="Does not match regex">
  Same as `Matches regex` but will match if the provided value does not match
  the regex pattern.
</ResponseField>
