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
- Import the attached
example.json. It has three parallel flows: Split Out → Get row(s) → If (hasField('uuid')) → Set → Success/Error log. - Make sure the data table
testcontains alice and bob. The upsert at the top of the workflow does this. - 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
pairedItemis 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: