n8n “Can’t Determine Which Item to Use”: Paired Items Fixed
Sasha Ray
22nd Oct, 2026

n8n “Can’t Determine Which Item to Use”: Paired Items Fixed
Few n8n errors confuse developers as much as this one: “ERROR: Can’t determine which item to use.” Your workflow runs fine until a node references data from an earlier step, and then the expression suddenly fails. The data clearly exists in the earlier node, so why can’t n8n find it?The answer lies in how n8n tracks data between nodes, a system called paired items (also known as item linking). Once you understand how paired items work, the n8n Can’t Determine Which Item to Use error becomes easy to diagnose and fix.This guide explains what paired items are, the most common causes of the error, and practical fixes you can apply right away. For complex workflows where this error keeps coming back, many businesses Hire n8n Developers to restructure their data flow properly.
What Are Paired Items in n8n?
In n8n, data moves between nodes as a list of items. When a node processes items, n8n keeps a record of which input item produced each output item.When you reference an earlier node using the $('Node Name').item syntax, n8n has to figure out which item in that node matches the current one, because the earlier node may contain many items. To do this, n8n keeps a link for every item that traces back through the workflow and shows which earlier items created it. n8nFor example:Get Customers (3 items)
│
▼
Get Orders (3 items, each linked to one customer)
│
▼
Send Email → uses $('Get Customers').item.json.emailWhen Send Email processes the second order, n8n follows the link back and finds the second customer. This is what makes .item so convenient.
Why the Error Happens
The error appears when n8n follows that link and can’t land on exactly one item. According to the n8n documentation, .item fails when the link points to more than one item in the earlier node, because n8n can’t tell which one you want. It also fails when the link is broken or missing entirely. n8nIn short, there are two root problems:
Missing link:
A node in the chain didn’t record which input item produced its output
Ambiguous link:
The output item was created from several input items, so there’s more than one possible match
You may see related messages such as:
“ERROR: Can’t determine which item to use”
“ERROR: Info for expression missing from previous node”
“ERROR: Multiple matching items for expression”
“Paired item data could not be resolved”
All of these point to the same underlying system.
Common Causes
1. Code Node Returning New Items Without pairedItem
This is the most common cause. When a Code node in “Run Once for All Items” mode builds brand-new items, n8n may not know which input item each output came from. Any later node that reaches past the Code node with .item can then fail.
2. Aggregate, Summarize, or Merge Nodes
Nodes that combine many items into one create ambiguous links. A single output item now points back to several input items, so .item has no single answer.
3. Merge Node with Multiple Inputs
When data from different branches is merged, items from one input don’t carry links to nodes on the other branch. Referencing a node from the “other” branch with .item often fails.
4. Mismatched Item Counts
If an earlier node returned 1 item and a later node returned 10, or the reverse, the links may not line up the way you expect.
5. Sub-Workflows and Loops
Data coming back from Execute Workflow (sub-workflows) or Loop Over Items can lose its link to nodes before the loop or sub-workflow started.
6. Custom or Community Nodes
Some custom and community nodes don’t set paired item information correctly, which breaks the chain for every node after them.
How to Fix the Error
Fix 1: Use $json for the Current Item
If the data you need is in the item coming directly into the node, you don’t need .item at all.js{{ $json.email }}$json only reads the incoming item and never uses paired item tracking, so it can’t trigger this error.
Fix 2: Use .first(), .last(), or .all()[index]
The n8n documentation recommends avoiding .item by using .first(), .last(), or .all()[index] instead. This works well when the earlier node returns a single item, such as a config, a token, or a settings record. n8njs{{ $('Get Settings').first().json.apiKey }}
{{ $('Get Customers').all()[$itemIndex].json.email }}Use .all()[$itemIndex] only when you’re sure both nodes have the same number of items in the same order.
Fix 3: Add pairedItem in the Code Node
When your Code node creates new items, tell n8n where each one came from:jsreturn $input.all().map((item, index) => ({
json: {
...item.json,
total: item.json.price * item.json.quantity
},
pairedItem: { item: index }
}));This restores the link so later nodes can safely use .item.
Fix 4: Switch the Code Node to “Run Once for Each Item”
In “Run Once for Each Item” mode, n8n handles item pairing for you automatically. If your logic processes items one at a time, this is the simplest fix.
Fix 5: Carry Data Forward Before It’s Lost
Instead of reaching back across a Merge, Aggregate, or loop, copy the fields you need into the item earlier in the workflow. Use an Edit Fields (Set) node with “Include Other Input Fields” turned on, so the data travels with the item. Later nodes can then use $json instead of .item.
Fix 6: Merge by Matching Fields
If you’re combining data from two branches, use the Merge node’s “Combine by Matching Fields” option with a shared key such as customer_id. This joins related data into one item, so you don’t need to reach back to other branches.
Fix 7: Pass Data Explicitly into Sub-Workflows
When calling a sub-workflow, send every field it needs as part of the input. Inside the sub-workflow, reference the trigger’s data with $json. Don’t try to reach nodes in the parent workflow.
Quick Troubleshooting Checklist
Situation | Recommended Fix |
|---|---|
Data is in the incoming item | Use
|
Earlier node returns a single item | Use
|
Code node creates new items | Add
or use “Run Once for Each Item” |
Reaching back across Aggregate or Summarize | Carry fields forward with Edit Fields |
Combining data from two branches | Merge by matching fields |
Sub-workflow needs parent data | Pass data as input |
Item counts match exactly | Use
|
How to Debug Paired Item Issues
When the cause isn’t obvious, use this process:
Find the failing expression.
Open the node and check which field shows the error.
Identify the referenced node.
Note which earlier node the expression points to.
Walk the path between them.
Look for Code, Merge, Aggregate, Loop, or sub-workflow nodes in between.
Compare item counts.
Check how many items each node outputs in the execution view.
Test with .first().
If it works, the problem is the link, not the data.
Apply the right fix.
Use the checklist above.
Best Practices to Prevent the Error
Prefer
$jsonwhenever the data is in the current item
Use
.first()for single-item references like settings or tokens
Always return
pairedItemwhen writing Code nodes that build new items
Keep important fields on the item as it moves through the workflow
Avoid reaching back across many nodes, especially across merges and loops
Use clear node names so references are easy to trace
Test workflows with multiple items, not just one, since many pairing bugs only show up with several items
Document data flow in complex workflows
Why Businesses Choose Professional n8n Developers
A single paired item error is usually quick to fix. In large workflows with branches, loops, sub-workflows, and custom code, however, these errors can repeat across dozens of nodes and cause silent data mismatches. Sometimes the wrong customer gets the wrong email. Many businesses Hire n8n Developers to audit their workflows, fix data flow issues at the root, and design workflows that stay reliable as they grow.
Why Choose N8n Developers?
N8n Developers provides Information Technology services and experienced developers who build, debug, and optimize n8n workflows for businesses of every size. Our team helps you:
Diagnose and fix paired item and expression errors
Restructure complex workflows for clean data flow
Write reliable Code nodes and custom nodes
Build scalable, well-documented automations
Provide ongoing workflow monitoring and support
Conclusion
The n8n Can’t Determine Which Item to Use error isn’t a bug in your data. It’s n8n telling you that it can’t trace an item back to a single source. Once you understand paired items, the fix is usually simple: use $json for current data, .first() for single items, pairedItem in Code nodes, and carry important fields forward instead of reaching far back.With these patterns in place, your workflows become easier to read, safer to change, and far less likely to break in production.Struggling with recurring n8n errors or complex workflow logic? Hire n8n Developers today to fix issues at the root and build automation you can rely on.
Frequently Asked Questions
1. What does “Can’t determine which item to use” mean in n8n?
It means n8n can’t trace the current item back to exactly one item in the node your expression references.2. What are paired items in n8n?
Paired items are links n8n keeps between output and input items, so expressions using .item can find matching data in earlier nodes.3. What is the quickest fix for this error?
Use $json for data in the current item, or .first() when the referenced node returns a single item.4. How do I fix paired item errors in the Code node?
Return a pairedItem value for each new item, or switch the Code node to “Run Once for Each Item” mode.5. Why should businesses Hire n8n Developers?
Experienced developers fix data flow problems at the root and build workflows that stay reliable as they scale.
Want me to put this into a doc so your team can review and comment on it?
n8n Expression Cheat Sheet (free, printable)
Meta Title: n8n Expression Cheat Sheet (Free, Printable)Meta Description: Free, printable n8n expression cheat sheet covering variables, node references, dates, strings, arrays, and logic. Hire n8n Developers for advanced workflows.Focus Keyword n8n Expression Cheat SheetSecondary Keywords
Hire n8n Developers
n8n expressions
n8n expression examples
n8n date expressions
n8n $json
n8n Luxon
n8n data transformation functions
Slug n8n-expression-cheat-sheet-free-printable
n8n Expression Cheat Sheet (Free, Printable)
Expressions are what turn n8n from a simple connector into a powerful automation platform. With expressions, you can pull data from earlier nodes, format dates, clean text, calculate totals, and make decisions inside any node field. You don’t need a separate Code node for any of it.The problem is remembering the syntax. Was it $json or $input? .first() or .item? How do you format a date or get yesterday’s date?This n8n Expression Cheat Sheet puts the most useful expressions on one page. Bookmark it, print it, or keep it next to your editor while you build. For complex workflows that go beyond expressions, many businesses Hire n8n Developers to design clean, scalable automation.
What Are n8n Expressions?
An expression is a small piece of JavaScript placed inside double curly braces in any node field:js{{ $json.firstName }}To use one, switch a field from Fixed to Expression, or type {{ directly. n8n evaluates the code for each item and shows a live preview of the result.Expressions support:
Standard JavaScript (string methods, math, ternaries)
n8n built-in variables like
$json,
$now, and
$executionn8n data transformation functions like
.extractEmail()and
.removeDuplicates()Luxon for date and time handling
1. Current Item Data
Expression | What It Does |
|---|---|
| Field from the current incoming item |
| Field with spaces or special characters |
| Nested field |
| First element of an array field |
| Number of elements in an array |
| Binary file name |
| Position of the current item (starts at 0) |
Tip: $json is the safest way to read data because it always refers to the item coming into the node.
2. Referencing Other Nodes
Expression | What It Does |
|---|---|
| Matching item from an earlier node |
| First item from a node |
| Last item from a node |
| Total items output by a node |
| Item at a specific position |
| First item from the input of the current node |
| All input items |
|
Tip: If .item throws “Can’t determine which item to use,” switch to .first() when the node returns one item, or use $json when the data is already in the current item.
3. Workflow and Execution Variables
Expression | What It Does |
|---|---|
| Workflow name |
| Workflow ID |
| Whether the workflow is active |
| Current execution ID |
| Execution mode, such as
or
|
| URL to resume a waiting workflow |
|
Tip: Add $workflow.name and $execution.id to error alerts so your team can find failed runs quickly.
4. Dates and Times (Luxon)
n8n uses the Luxon library for dates. $now returns the current date and time, and $today returns today at midnight.
Expression | What It Does |
|---|---|
| Current date and time |
| Today at midnight |
| Format as 2026-10-20 |
| Format as 20/10/2026 14:30 |
| ISO 8601 timestamp |
| Unix timestamp in milliseconds |
| Yesterday’s date |
|
Common format tokens: yyyy year, MM month, dd day, HH hour (24h), hh hour (12h), mm minutes, ss seconds, a AM/PM, MMM short month name, EEEE weekday name.
5. Strings
Expression | What It Does |
|---|---|
| Convert to uppercase |
| Convert to lowercase |
| Capitalize each word |
| Remove extra spaces at the start and end |
| Join two fields |
| Template string |
| Replace text |
|
6. Numbers and Math
Expression | What It Does |
|---|---|
| Multiply two fields |
| Round to two decimal places |
| Round down |
| Round up |
| Larger of two values |
| Percentage |
| Convert to a number |
|
7. Arrays
Expression | What It Does |
|---|---|
| Number of items |
| Join into a single string |
| Check if a value exists |
| First element |
| Last element |
| Remove duplicate values |
| Extract one field from each object |
|
8. Objects
Expression | What It Does |
|---|---|
| List of field names |
| List of field names (n8n shortcut) |
| Check if a field exists |
| Remove a field |
| Remove empty fields |
| Check if an object is empty |
| Convert an object to a JSON string |
|
9. Conditional Logic and Fallbacks
Expression | What It Does |
|---|---|
| If/else |
| Fallback when the value is null or undefined |
| Safe access when the parent might be missing |
| Combine two conditions |
| Multiple conditions |
| Check that an array exists and has items |
| Convert a value to true or false |
Tip: Optional chaining (?.) and the nullish operator (??) prevent many “Cannot read properties of undefined” errors.
10. Querying JSON with JMESPath
For complex nested data, $jmespath() lets you query JSON with a short syntax.
Expression | What It Does |
|---|---|
| All order IDs |
| Only paid orders |
| Nested field from the first order |
Common Expression Mistakes
Using
.itemacross Merge, Aggregate, or loops:
Use
.first()or carry the field forward instead
Forgetting the curly braces:
Text without
{{ }}is treated as plain text
Treating strings as numbers:
"10" + "5"returns
"105". Use
.toNumber()first
Expressions vs the Code Node
Use Expressions When | Use the Code Node When |
|---|---|
Mapping or formatting single fields | Transforming many fields at once |
Simple calculations | Complex logic with loops |
Date formatting | Restructuring entire items |
Short conditions | Combining or splitting many items |
Pulling values from earlier nodes | Reusable logic that’s hard to read inline |
A good rule: if an expression no longer fits comfortably on one line, move it to a Code node.
Download the Free Printable Cheat Sheet
Want this on your desk? Download the free printable n8n Expression Cheat Sheet as a PDF. It includes all the tables above in a compact, print-friendly layout, so you can keep the most useful expressions within reach while you build.[Download the Free Printable PDF]
Why Businesses Choose Professional n8n Developers
Expressions handle most day-to-day data mapping. Production workflows, however, often need clean data architecture, reusable sub-workflows, error handling, and well-structured Code nodes. Many businesses Hire n8n Developers to build workflows that are easy to read, simple to maintain, and reliable at scale.
Why Choose N8n Developers?
N8n Developers provides Information Technology services and experienced developers who build, optimize, and maintain n8n workflows for businesses of every size. Our team helps you:
Build complex data transformations and mappings
Fix expression and paired item errors
Write clean, reusable Code nodes
Design scalable workflow architecture
Provide ongoing workflow support and training
Conclusion
Mastering expressions is one of the fastest ways to level up in n8n. With this n8n Expression Cheat Sheet, you can reference data, format dates, clean text, and build conditional logic without guessing at syntax or reaching for a Code node every time.Keep it bookmarked, print the PDF, and use it as your quick reference whenever you build. When your workflows outgrow simple expressions, our team is ready to help. Hire n8n Developers today to build automation that’s powerful, clean, and built to scale.
Frequently Asked Questions
It means n8n can’t trace the current item back to exactly one item in the node your expression references.
Paired items are links n8n keeps between output and input items, so expressions using .item can find matching data in earlier nodes.
Use $json for data in the current item, or .first() when the referenced node returns a single item.
Return a pairedItem value for each new item, or switch the Code node to “Run Once for Each Item” mode.
Experienced developers fix data flow problems at the root and build workflows that stay reliable as they scale.

