๐Ÿ‡ฌ๐Ÿ‡ง EN
๐Ÿ‡ฎ๐Ÿ‡น IT

๐Ÿ”ฝ Filter

Filters an array to keep only items that match a condition. Use it after a RAG query, HTTP request, or Loop that produces a list, to narrow down results before passing them to another step.

Category: Data Manipulation  ยท  Type identifier: filter

Overview

When a workflow receives a large array of items โ€” search results, orders, users, log entries โ€” you often only need a subset of them. The Filter node lets you reduce that array to just the relevant items using a simple condition before passing it on to a Loop, an Agent, or any subsequent step.

You specify a property name on each array item and compare it against a value using one of the built-in operators. The condition is evaluated once per item. Items for which it evaluates to true are kept; all others are discarded. The filtered result and item counts are then available to downstream steps via the standard step output syntax.

Configuration

FieldStatusDescription
Array Required Reference to the array to filter, e.g. {{ search.output.results }}.
Condition Field Required The property name on each array item to evaluate, e.g. score.
Operator Required Comparison operator โ€” equals, not_equals, greater_than, less_than, contains, not_contains, is_null, is_not_null, is_empty, is_not_empty.
Value Optional The value to compare against. Not needed for is_null, is_not_null, is_empty, is_not_empty.

Output Data

The Filter node exposes the following fields on its step output:

FieldTypeDescription
itemsarrayFiltered array containing only items that matched the condition.
countnumberNumber of items in the filtered array.
excluded_countnumberNumber of items removed by the filter.
{{ step_key.output.items }} {{ step_key.output.count }} {{ step_key.output.excluded_count }}

Example Usage

  1. Add a RAG node (step key: search) that returns an array of result objects, each with a score property.
  2. Add a Filter node. Set Array to {{ search.output.results }}, Condition Field to score, Operator to greater_than, and Value to 0.8.
  3. Add a Logic Gate after the filter to check {{ filter.output.count }} is greater_than 0 before continuing.
  4. Add an Agent node on the true branch and pass it {{ filter.output.items }} โ€” the agent now processes only high-confidence matches.

Tips & Notes

Related Nodes