Filter
The Filter node processes an array of items and returns only the ones that match your conditions. Use it to narrow down data before passing it to downstream nodes: process only relevant records, remove duplicates, or extract items meeting specific criteria.
When to use Filter vs. If-Else
| Node | Works on | Purpose |
|---|---|---|
| Filter | Arrays of items | Keep/remove items from a list based on conditions |
| If-Else | Single values | Branch the workflow based on a condition |
Filter = "From these 100 leads, keep only the ones with a score above 80" If-Else = "If this lead's score is above 80, take path A; otherwise path B"
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| Input array | FX formula | Yes | The array to filter, e.g., {{find_all.records}} or {{http_request.body.items}} |
| Condition | Condition builder | Yes | Filter criteria: items matching this stay, others are removed |
| Mode | Select | No | Keep matching (default) or Remove matching |
Condition operators
| Operator | Works with | Example |
|---|---|---|
| equals | Text, Number | status equals active |
| not equals | Text, Number | status not equals archived |
| contains | Text | email contains @company.com |
| does not contain | Text | name does not contain test |
| greater than | Number | score greater than 80 |
| less than | Number | amount less than 1000 |
| is empty | Any | phone is empty |
| is not empty | Any | email is not empty |
| starts with | Text | url starts with https:// |
| ends with | Text | email ends with .com |
| matches regex | Text | phone matches ^\+1.* |
Multiple conditions
Add multiple conditions. Choose the logic:
| Logic | Meaning |
|---|---|
| AND | All conditions must be true (default) |
| OR | At least one condition must be true |
Output variables
{{filter.result}} → array of items that passed the filter
{{filter.count}} → number of items that passed
{{filter.removed}} → number of items that were filtered out
{{filter.total}} → original array length
Common patterns
Filter high-value leads from enrichment
Find All (all leads) → Filter (score > 80 AND status = "new") →
For Each → Send Email (personalized outreach)
Remove already-processed items
HTTP Request (get all orders) → Filter (processed_at is empty) →
For Each → Process order → Update Record (set processed_at)
Extract items with missing data
Find All (contacts) → Filter (email is empty OR phone is empty) →
Google Sheets (export for manual cleanup)
Clean webhook data
Webhook (batch payload) → Filter (remove items where amount = 0) →
For Each → Create Record
Filter + For Each pattern
Filter and For Each are commonly used together:
- Filter narrows the array to relevant items
- For Each processes each remaining item individually
Find All (1000 contacts) → Filter (unsubscribed = false AND last_contact > 30 days) →
Result: 150 contacts → For Each → GPT Writer (personalized email) → Send Email
Without the Filter, you'd process all 1,000 contacts (wasting AI credits). With it, you only process the 150 that matter.
Always filter before expensive operations (AI, enrichment, API calls). Processing 100 filtered items is much cheaper than processing 1,000 items and discarding 900 of the results.
Filter processes the entire array in memory. For very large arrays (10,000+ items), consider using a database query with filters instead (Find All with filter conditions) for better performance.