// guides · n8n error index

n8n Filter node not working: items removed, type errors and empty checks, 32 runs

Fix the n8n Filter node: all items discarded with a green run, "Wrong type: is a string but was expecting a number", case and trailing-space mismatches, null and empty values, Discarded output. 32 real runs on n8n 2.43.7.

Updated 2026-10-24 · about 10 minutes

Still stuck after these steps? Paste your exact n8n error and we'll reproduce it and email you the fix, free →

Steps

  1. Expect silence: discarded items leave no trace

    With the condition status equals paid, three of four items were discarded and the execution still showed success. When nothing matched at all, 0 items came out, the next node never ran, and n8n gave no hint. To see what was dropped, use the node's second output: in our workflow JSON the discarded items came out of output index 1 once a node was connected there. If your editor doesn't show that output, put an IF node with the same condition in place of the Filter for a while and look at its false branch. Always Output Data in the node settings only sends one empty item {} onward, so the next node runs on nothing.

  2. Trim the value: spaces beat case-insensitivity

    Turning Case Sensitive off kept PAID but still dropped Paid , because of the trailing space. Setting Ignore Case only in the node options, while the condition itself stayed case-sensitive, changed nothing. Normalise the left value instead: {{ $json.status.trim().toLowerCase() }} kept all three paid items. A regex like ^paid$ is just as strict.

  3. Fix "Wrong type: ... is a string but was expecting a number"

    Filter conditions check types strictly. A Number condition on the text "120" stopped the run with Wrong type: '120' is a string but was expecting a number [condition 0, item 0]. The same happened for Boolean on "true", for Date & Time on 24/10/2026 (only ISO dates pass), for a String condition on a real number (is a number but was expecting a string), and when the right-hand value was {{ '50' }}. Turn on Convert types where required, which on Filter 2.2 is a toggle next to the conditions (putting it under Options did nothing), or convert in the value with .toNumber(), .toBoolean() or .toString().

  4. One bad value still fails the whole run

    With Convert types where required on, a single item with amount: "abc" stopped everything with Conversion error: the string 'abc' can't be converted to a number [condition 0, item 2]. Item numbers start at 0, so item 2 is the third item. Clean values first, for example {{ Number($json.amount) || 0 }}.

  5. Don't hide errors with On Error: Continue

    With the type error and Settings > On Error: Continue, the run turned green, all 4 items were discarded and the next node never ran. The error is still there; it just looks like nothing matched. Fix the type instead of continuing past it.

  6. Know how null, missing and empty values behave

    total < 50 kept an item where total was null, because null compares like 0. is empty matched "" and null, but not a single space " ", which is not empty kept. does not equal FR kept an item with no country at all. exists treated 0 as existing and null as missing. Add an explicit exists condition (AND) when a missing field should be dropped.

  7. Check the field is an expression, and beware float equality

    A left value written as {{ $json.status }} in Fixed mode compared the literal text and kept 0 items, with no error. Switch the field to Expression. Number equals {{ 0.1 + 0.2 }} against 0.3 discarded the item; round first with .toFixed(2) or compare a range.

  8. Combine conditions with AND or OR

    AND (status paid and country FR) kept only Ana; OR (status paid or country DE) kept Ana and Dee. A Filter with no conditions kept every item. Filter versions 2.3, 2 and the legacy version 1 behaved the same in our runs.

What we ran

On 24 October 2026 we ran 32 executions on n8n 2.43.7 with n8n execute: a Manual Trigger, a Code node sending four items, the Filter node (version 2.2, plus 2.3, 2 and 1), and a No Op node on the kept output. Ana had status paid, amount "120", country FR; Bo had status Paid (capital and trailing space), country fr, date 24/10/2026, note ""; Cy had status PAID, amount "abc", total null, no country, note " "; Dee had status refunded, total 0, country DE, note null.

SetupResult
status equals paid (default, case-sensitive)Ana kept; Bo, Cy and Dee discarded silently; run shows success
Case Sensitive off on the conditionAna and Cy (PAID) kept; Bo (Paid ) still discarded: trailing space
Ignore Case set in node options only, condition still case-sensitive (imported JSON)No effect: only Ana
Left value {{ $json.status.trim().toLowerCase() }}Ana, Bo and Cy kept (fixed)
Number > 50 on the string "120", strictWrong type: '120' is a string but was expecting a number [condition 0, item 0]
Same with Convert types where required onConversion error: the string 'abc' can't be converted to a number [condition 0, item 2]; one bad item fails the run
Loose type validation put under Options on v2.2Ignored, same Wrong type error
Strict error plus Settings > On Error: ContinueNo error, all 4 items discarded, next node never runs
total < 50 with total null and 0Bo, Cy (null) and Dee (0) kept: null compares like 0
Nothing matches0 items kept, next node doesn't run, run shows success
Same with Always Output DataOne empty item {} reaches the next node
country existsCy (no country field) discarded
note is emptyBo ("") and Dee (null) kept; Cy (" ") is not empty
note is not emptyAna and Cy kept: a single space counts as not empty
Boolean is true on the string "true"Wrong type: 'true' is a string but was expecting a boolean [condition 0, item 0]
Date & Time is after or equal 2026-10-24 on ISO stringsAna kept; null date discarded without error; 2026-10-23T23:30:00+02:00 discarded (offset respected)
Date & Time is after on 24/10/2026Wrong type: '24/10/2026' is a string but was expecting a dateTime [condition 0, item 1]
Left value {{ $json.status }} in Fixed mode0 items kept, no error
Array contains vipWorks
OR: status paid or country DEAna and Dee
AND: status paid and country FRAna only
No conditionsAll 4 items kept
Discarded output connectedBo, Cy and Dee flow to the second output
String matches regex ^paid$Only the exact paid
Number equals {{ 0.1 + 0.2 }} against 0.3Discarded: floating-point precision
String contains 12 on the number 120Wrong type: '120' is a number but was expecting a string [condition 0, item 0]
country does not equal FRBo (fr), Cy (no field) and Dee kept: a missing field counts as not equal
Right value {{ '50' }} with Number >Wrong type error on the second value
Number exists on total0 exists (kept); null does not (discarded)
Filter v2.3, v2 and legacy v1, same as the first runIdentical results

Quick checklist

Good to know

What we didn't test

FAQ

Why does my n8n Filter node remove all items?

Usually the condition never matches: a trailing space, a case difference, a field in Fixed mode instead of Expression, or a type mismatch hidden by On Error: Continue. Check the discarded items, then trim and lowercase the value.

Why doesn't the node after my n8n Filter run?

When the Filter keeps 0 items, the next node doesn't run and the execution still shows success. Always Output Data makes it run, but only with one empty item.

What does 'Wrong type: is a string but was expecting a number' mean in the n8n Filter node?

The condition compares numbers but the value is text, like "120". Turn on Convert types where required, or convert with .toNumber(). Values like 'abc' still fail with a Conversion error.

Does the n8n Filter node treat a space as empty?

No. is empty matches an empty string and null, but a single space counts as not empty. Trim the value first.

Is the n8n Filter node case sensitive?

Yes, string conditions are case-sensitive by default. Turning Case Sensitive off doesn't remove spaces, so trim and lowercase the value for reliable matches.

Related guides

New guides

Still stuck on your n8n error?

Paste the exact error and say what the workflow should do. We reproduce it on a real n8n install and email you the fix or a working workflow, usually within 24h. Free while we're in beta.

We'll only email you about your error and TaskToAgent.