n8n · tool · fg-0345

n8n expression errors with 'Multiple matching items for expression' after an Aggregate or Merge

ERROR: Multiple matching items for expression

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

$('Node').item follows each item back through the item links, and that thread breaks after nodes that combine items, after Code nodes that drop pairing, or across merged branches.

Fix

Use .first(), .last() or .all()[index] when you know the position, or set pairedItem in Code node output so links survive.

Apply

{{ $('Get customer').first().json.email }}
// Code node: return items.map((it, i) => ({ json: {...}, pairedItem: i }));  // index of the input item

Affects: n8n 1.x and 2.x, as of 2026-10

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp