All guides

n8n AI output filtering: conditions and omitted records

Select outputs with field conditions, distinguish AND from OR, and inspect omitted records separately.

AINavWritten / Updated Sources checked
On this page

At a glance

The goal is to select AI results that meet a field contract before downstream processing. Known fields such as id, text and status are required. The Filter documentation was checked and synthetic conditions inspected locally. n8n and a model were not run. Field gates do not certify answer truth.

Input, configuration and output checks

  1. Define input

    Inspect identifiers and field types.

  2. Configure the operation

    Choose the documented mode and relevant options.

  3. Inspect results

    Check mapping and output before downstream use.

Documentation and local fixtures are separate from product execution.

Define qualifying fields and failing samples

Synthetic a has status=ready and nonempty text; b has status=ready and empty text; c has status=review and nonempty text. Specify that only a should pass and inspect types. String exists differs from is not empty: a present empty field may still fail. Conditions must fit real upstream data; these samples do not cover all model failures.

Multiple conditions use all AND or all OR

Filter supports conditions for String, Number, Date & Time, Boolean, Array and Object. The exercise uses status is equal to ready and text is not empty with AND. AND requires every condition; OR requires any one. One node cannot mix AND and OR. More complex combinations require a separately inspected flow; displayed rule order is not a logical parenthesis.

Make case handling and conversion explicit

Ignore Case controls case comparison. Less Strict Type Validation lets n8n attempt type conversion required by the operator. The lowercase-status/string-text exercise does not rely on relaxed conversion. For numbers or empty objects, establish whether they meet the business contract. Passing after conversion does not establish the original type, and a Boolean condition does not establish a text source.

Inspect passing records separately from total input

The docs say qualifying items pass onward and failing ones are omitted. Filter does not automatically provide a completion record for every input. Locally, AND retains a and OR retains a, b and c; null conversion was not simulated. Inspect input ids, passing ids and the destination of failures. Retaining failures needs a separate verified route. Output count is not all-input success; stop downstream writes when omissions are unexplained.

Article sources

Original editorial content; official descriptions and checking suggestions are distinguished.

  1. n8n · Official sources
    View details