Filter
Keeps only items that match specified conditions.
Overview
The Filter node evaluates conditions and passes through only matching items. Non-matching items are discarded. Use it to:
- Remove unwanted data
- Select specific records
- Narrow down results
Parameters
| Parameter | Description | Required |
|---|---|---|
| Conditions | List of conditions to evaluate | Yes |
| Combine Operation | How to combine multiple conditions | Yes |
| Convert Types | Auto-convert values before comparison | No |
| Ignore Case | Case-insensitive string comparisons | No |
Conditions
Same condition structure as the If node:
| Property | Description |
|---|---|
| Field 1 | Left side of comparison (supports expressions) |
| Operation | Comparison operator |
| Field 2 | Right side of comparison (for binary operations) |
Comparison Operations
| Operation | Description |
|---|---|
| Equals | Values are equal |
| Not Equals | Values are different |
| Greater Than | Field 1 > Field 2 |
| Greater Than or Equal | Field 1 >= Field 2 |
| Less Than | Field 1 < Field 2 |
| Less Than or Equal | Field 1 <= Field 2 |
| Contains | String contains substring |
| Not Contains | String doesn't contain substring |
| Starts With | String starts with value |
| Ends With | String ends with value |
| Regex | Matches regex pattern |
| Is Set | Value exists |
| Is Not Set | Value is null/undefined |
| Is Empty | Value is empty |
| Is Not Empty | Value is not empty |
Combine Operation
| Option | Behavior |
|---|---|
| AND | All conditions must match |
| OR | At least one condition must match |
Output
Only matching items pass through. Non-matching items are discarded (not sent to an error output).
Input:
[
{ "name": "Alice", "status": "active" },
{ "name": "Bob", "status": "inactive" },
{ "name": "Carol", "status": "active" }
]
Condition: status Equals active
Output:
[
{ "name": "Alice", "status": "active" },
{ "name": "Carol", "status": "active" }
]
Examples
Filter by Status
Keep only active records:
- Condition:
{{\$item.data.status}}Equalsactive
Filter by Amount
Keep high-value orders:
- Condition:
{{\$item.data.amount}}Greater Than100
Filter Non-Empty
Keep items with email addresses:
- Condition:
{{\$item.data.email}}Is Not Empty
Multiple Criteria (AND)
Keep active, high-value customers:
- Combine: AND
- Condition 1:
{{\$item.data.status}}Equalsactive - Condition 2:
{{\$item.data.totalSpent}}Greater Than1000
Multiple Criteria (OR)
Keep priority items:
- Combine: OR
- Condition 1:
{{\$item.data.priority}}Equalshigh - Condition 2:
{{\$item.data.flagged}}Equalstrue
Exclude Records
Keep all except deleted:
- Condition:
{{\$item.data.deleted}}Not Equalstrue
Pattern Matching
Keep .com email addresses:
- Condition:
{{\$item.data.email}}Ends With.com - Ignore Case: enabled
Filter vs If
| Use Filter when... | Use If when... |
|---|---|
| You only need matching items | You need to process both matches and non-matches |
| Non-matches should be discarded | Non-matches need different processing |
| Simple keep/discard logic | Branching workflow logic |
Tips
- Filter is simpler than If when you don't need the false output
- Non-matching items are completely discarded
- Use "Convert Types" for numeric comparisons on string fields
- Enable "Ignore Case" for case-insensitive text matching
- Chain multiple Filter nodes for complex logic
- If no items match, downstream nodes receive no input