Skip to content

Query

The Query data type is used to define logical rules. It is different from text, number, date, or table types because it represents a condition, not a value. A Query tells Monkedo how to compare two pieces of data and decide whether the result is true or false.

The Query data type appears only in some components, but its most important usage is inside the Condition component. When building automations, the Condition component allows your workflow to make decisions. Queries are used to evaluate these decisions. If the query is true, the automation follows the β€œTrue” path; if false, it follows the β€œFalse” path. This makes Query essential for branching logic, filtering, and controlling the flow of an automation.

A Query rule is made of three parts:

  1. Input – the value you want to check. (Example: task status, price, name, date, email subject)

  2. Comparison – what type of check you want to perform. (equal, contains, greater than, empty, etc.)

  3. Value – the thing you compare the input to. (Example: β€œCompleted”, 100, β€œurgent”, β€œ2024-01-01”)

query
Setting query rules

Comparison Options

  • equal β€” true if the input is exactly the same as the value.

  • not equal β€” true if the input and value are different.

  • greater than β€” true if the input is greater than the value.

  • greater than or equal β€” true if the input is greater than or equal to the value.

  • less than β€” true if the input is smaller than the value.

  • less than or equal β€” true if the input is smaller than or equal to the value.

  • contains β€” true if the input includes the value anywhere inside it.

  • not contains β€” true if the input does not include the value.

  • in β€” true if the input matches one item in a list of values.

  • not in β€” true if the input does not match any item in a list.

  • empty β€” true if the input exists but has no value.

  • no empty β€” true if the input has any value.

  • set β€” true if the field exists.

  • not set β€” true if the field does not exist at all.

  • starts with β€” true if the input begins with the value.

  • ends with β€” true if the input ends with the value.

  • matches pattern (regex) β€” true if the input fits a regular expression.

  • is alpha β€” true if the input contains only letters.

  • is numeric β€” true if the input contains only numbers.

  • is date β€” true if the input is a valid date.

Common Confusions for Comparisons

empty vs. not set:

  • β€œempty” means the field exists but is blank;

  • β€œnot set” means the field does not exist.

contains vs. in:

  • β€œcontains” searches inside text;

  • β€œin” checks whether the input is one of several listed values.

starts with vs. contains:

Beginning of text vs. anywhere in text.

AND / OR Logic in Query

You can combine multiple comparisons to build more advanced rules.

AND Rule

All conditions must be true. Example: Price > 100 AND Category = β€œElectronics”. Both must be true for the query to pass.

OR Rule

Only one condition needs to be true. Example: Status = β€œActive” OR Status = β€œPending”. If either condition is true, the query passes.