Data Table "Get row(s)" with alwaysOutputData breaks item pairing for downstream $('Node').item references when inputs and outputs differ

Describe the problem/error/question

When a Data Table “Get row(s)” node receives several input items and only some or none of them match, the number of output items no longer matches the number of input items. With “Always Output Data” enabled and no matches at all, it emits a single empty item for N inputs. A later node that references a node before the lookup, e.g. $('Split Out').item.json.email, can then no longer resolve the paired item and fails.

In my real workflow, I fetch several Jira tickets, run “Get row(s)” per ticket to find an Data Table entry based on a ticket field, and branch on whether a match was found. The “no match” branch references an earlier “Transform data” node (extracting data from said Jira ticket), and that fails whenever more than one ticket is retrieved and not all of them match.

To reproduce

  1. Import the attached example.json. It has three parallel flows: Split Out → Get row(s) → If (hasField('uuid')) → Set → Success/Error log.
  2. Make sure the data table test contains alice and bob. The upsert at the top of the workflow does this.
  3. Execute the workflow.
Flow Inputs Matches Result
Good alice, bob 2 2 matched outputs
Partial alice, bobby 1 1 output, no-match branch doesn’t trigger
Broken alfred, bobby 0 No-match branch, throws error

Expected behaviour

Each output item of “Get row(s)” keeps a pairedItem link to the input item that produced it. For an input with no match, either the empty item points back to its own input, or paired-item resolution still works, so $('Split Out').item resolves in downstream nodes.

For N inputs, N outputs are provided. If there are no matches for an input and “Always Output Data” is selected, an empty object is returned for every non-matching input.

Observations

  • Number of outputs ≠ number of inputs. The “Broken” flow has 2 inputs and 1 output.
  • The output item’s pairedItem is missing or points to the wrong index.
  • Same behaviour with a single input works, so it only shows with more than one item.

What is the error message (if any)?

Multiple matches found

Please share your workflow

Share the output returned by the last node

Error

Information on your n8n setup

  • n8n version: 2.41.6
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system:

Hey @Sequr, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@ramin1, @sebauautu, @Jim_Le - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

Hey @Sequr Welcome to the n8n Community !!
In 2.41.6, Always Output Data adds one empty item only when the entire Get returns nothing. That item is linked to all inputs, hence “Multiple matches found”. With partial matches, it doesn’t create an empty item for each missed lookup; the returned rows keep their pairing.

For your Jira flow, replace Get → If with two Data Table nodes fed directly from Transform data: If Row Exists for the match branch and If Row Does Not Exist for the no-match branch, both using your existing lookup condition. Leave Always Output Data off on both. These operations forward the original ticket and preserve its item link. If the matched branch needs fields from the stored row, add Get after If Row Exists.

Deepankar’s If Row Exists / If Row Does Not Exist split is the cleanest fix if you only need to branch. If the match branch also needs fields from the stored row, you can skip the per-ticket Get and the pairing problem completely.

Pull the table once (Get row(s) with no filter, Execute Once on), then use a Merge node: Combine by matching fields, your ticket field on input 1 vs the column on input 2, output Enrich Input 1. Every Jira item comes out carrying its own fields plus the uuid when there’s a match. Your If on hasField(‘uuid’) then works for 1, 2 or 20 tickets, and the no-match branch reads from $json instead of reaching back to an earlier node.

Rule I follow now: once a lookup can return a different item count than it received, carry the data forward on the item instead of referencing back with .item.