Filter

The Filter acts as a conditional gate for your data flow, allowing you to branch logic based on conditions. It is the primary method for implementing if/else scenarios in your flows.

The Filter evaluates a JavaScript expression you provide, which must return true or false. The input value from the previous output is available as the variable x. If the result is true, the data is passed on; if false, the data flow is halted at this point. At the same time, the true and false states of the filter can be used to trigger separate logic paths.

circle-exclamation

Examples

1. Check a numeric value This expression checks if the temperature value in an incoming object (x) exceeds a threshold of 90.

x.temperature > 90

2. Check text content This expression checks if an incoming message (x) contains the word "Error".

x.includes('Error')

Visual Example

A function with four filters.

Last updated