Skip to content

Filter

The Filter node acts like a smart sieve for your data. It examines each piece of information and keeps only the items that meet your specific requirements, while discarding everything else.

Think of it like sorting through a pile of photos - you might want to keep only the ones that are in focus, from a certain date, or contain specific people. The Filter node does the same thing with your workflow data.

Illustration of data filtering process

The Filter node examines each item in your data collection one by one. For each item, it checks whether it meets your specified conditions. Items that pass the test are kept, while items that fail are removed from the results.

graph LR
  Input[All Data Items] --> Filter{Filter Node}
  Filter -->|Meets Criteria| Keep[✅ Keep Item]
  Filter -->|Fails Criteria| Remove[❌ Remove Item]
  Keep --> Output[Filtered Results]
  style Filter fill:#6d28d9,stroke:#fff,color:#fff
  1. Connect your data: Link the Filter node to a previous step that provides the data you want to filter.

  2. Choose filter type: Select whether you want to filter by specific values, ranges, text content, or custom conditions.

  3. Set your criteria: Define what makes an item worth keeping. For example, “keep articles longer than 100 words” or “keep products under $50”.

  4. Test the filter: Run a small sample to make sure you’re getting the results you expect.

Practical example: Article quality control

Section titled “Practical example: Article quality control”

Let’s say you’re collecting news articles from various sources, but you only want high-quality articles that are complete and substantial.

Let’s say you’re collecting news articles from various sources, but you only want high-quality articles that are complete and substantial.

Input Data: Imagine you have three articles:

  1. “Breaking News”: A full article with an author and 450 words.
  2. (Empty Title): Just a “snippet” with no author and 12 words.
  3. “Weather Update”: A short 85-word update.

Filter Conditions: You set the node to keep items only if:

  • Title is not empty.
  • Author is not empty.
  • Word count is at least 100.

Result: Only the first article (“Breaking News”) is kept. The other two are removed from the workflow because they didn’t meet all your criteria.

In this example, the filter kept only articles that have:

  • A title (not empty)
  • An author (not empty)
  • At least 100 words of content
Condition TypeExamplePurpose
Has ContentTitle is not emptyRemove incomplete items
Minimum LengthContent has at least 100 charactersEnsure substantial content
Specific ValuesStatus equals “published”Keep only certain types
Number RangesPrice between $10 and $100Filter by numeric criteria
Date RangesCreated after January 1, 2024Keep recent items only
Contains TextDescription contains “urgent”Find items with keywords
  • No items pass the filter: Your criteria might be too strict. Try relaxing one condition at a time to see which one is blocking everything.
  • Too many items still getting through: Add additional filter conditions to be more selective about what you keep.
  • Filter runs slowly: If you’re processing thousands of items, consider filtering in smaller batches or simplifying your conditions.