header
login

Conditions (if)

The if function allows you to create branches in your workflow: perform different actions depending on a condition.

Condition Syntax

A condition is written as a string expression:

"{=message=}" == "/start"

Comparison Operators

Operator Description Example
== Equal "{=message=}" == "Hello"
!= Not equal "{=message=}" != ""
>, < Greater / less than {=count=} > 5
>=, <= Greater or equal / less or equal {=count=} >= 10

Logical Operators

Conditions can be combined:

"{=message=}" == "yes" || "{=message=}" == "Yes"
  • || — logical OR
  • && — logical AND

Then and Else Branches

  • then — executed when the condition is true
  • else — executed when the condition is false

Each branch can contain any number of functions, including nested if blocks.