Skip to content

Expressions

Aditya Rajput edited this page Jun 22, 2026 · 1 revision

Expressions are combinations and compositions of functions that can be used to define a criteria to match notifications against. Expressions are modelled after basic Kotlin/Java syntax:

or(titleMatches("8pxl"), and(not(contentMatches("photo")), contentMatches("poll")))

Available functions

Function name Description No. of arguments
titleMatches Matches the notification title against the provided regex 1
contentMatches Matches the notification content against the provided regex 1
and Performs logical AND operation 2
equal Checks if inputs are equal 2
not Performs logical NOT operation 1
or Performs logical OR operation 2

Example expressions

and(titleMatches("Poll"), contentMatches("poll"))
// ⤷ Same behavior as a "Search in the notification's title and content"-type filter.

and(and(titleMatches("1"), not(titleMatches("2"))), or(contentMatches("3"), contentMatches("4")))
// ⤷ Content must contain either 3 or 4, and title must contain 1 but not 2.

equal("a", "b")
// ⤷ Why would you do this?

Notes

  1. Expressions are added for advanced use-cases. Please prefer standard regex filters if possible.
  2. Expressions deal in strings and lists of strings. The outputs are always strings, even if they represent a boolean value. This means that behind the scenes not, for instance, is taking the input "true" and giving the output "false".

Clone this wiki locally