Rule node
The Rule node is where a flow decides whether something is correct. It evaluates a condition and branches the flow into two paths.
The Rule node is where a flow decides whether something is correct. It evaluates a condition against the data available to it (the output of Fetch nodes and the triggering event's parameters) and produces a result of true or false. That result branches the flow into two paths, which is what lets a flow respond differently depending on the outcome (for example, sending an alert only when a check fails).
A rule is defined by:
The expression language
Rules are written using an expression builder, a dedicated expression language for comparing and evaluating values. It operates on the data available to the rule: the output of Fetch nodes and the parameters of the triggering event. An expression evaluates to a single value; when used as a rule, that value is a true/false result that determines the flow's branch.
Functions
The expression builder includes built-in functions, grouped into categories. Each function is written as a call with named parameters, for example, abs(numeric_value). Some functions accept more than one form (for example, with or without an optional argument); each form is listed separately below.
Math functions
String functions
Date & time functions
JSON functions
List functions
Variable & output functions
These are how a rule references fetched data and event parameters when building a condition: comparing a value returned by a Fetch node against a threshold, or against a value carried on the triggering event.
config() and retry() let a rule read how the flow itself is configured. The keys config() returns for each node type are:
delay is the wait the current execution actually ran with, which on a retry is the rule's retryDelay rather than the original event delay. retry(node_name) is shorthand for that Rule node's retry key, and returns null instead of failing when pointed at another node type. Because it counts a single rule's retries, retry("retry_gate") < config("retry_gate")["noRetries"] is true while the rule still has retries left.
What happens next
A rule's true/false result determines what happens next in the flow. Each branch can lead to a different Action node, for example, taking no action when a rule holds, and sending an alert when it does not. See the Action node.