Expressions Randomly

I had expressions that worked fine initially, but once I added a Split In Batches node, some values started returning undefined, why is that ?

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

This one took me a bit to understand.

It’s not missing data, it’s item linking breaking.

When the number of items changes between nodes, n8n can’t map them properly anymore

What fixed it:

  • Using $items(“Node Name”, 0, 0) for explicit access
  • Restructuring the flow to keep item counts consistent
2 Likes

Hi @Friday_Faith
welcome to the n8n community :tada:

could you share a bit more detail on what you mean by “expressions randomly”? For example, are the expressions failing only sometimes, showing different results between runs, or not resolving at all? A screenshot of the node, the expression you’re using, and a sample input/output would help a lot to understand whether this is an expression issue, stale data, or something environment-specific.

will send the screenshot when I get home

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.