Set Node Error with no items to process

My workflow runs into an error, although no items are shown to be passed

Here’s what this part of the workflow looks like:


There are 4 input items on the IF node, and all of them are sent to the NoOp false condition

What’s the mistake here? Are the merge nodes causing the error?

In the Set node, I do have some basic JS expressions like split() or ternary operators. They work fine when there is an actual input item to process.
I am thinking that maybe my ‘stacked’ merge operations are calling the nodes to run even though there are no UI-based/linear conditions to indicate the logic.
Should I be connecting the NoOp node to the same destinations as the set node?

The output of the Set Node is ERROR: No data found for item-index: “0”

ExpressionError: No data found for item-index: "0"
    at Object.get (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/WorkflowDataProxy.js:262:31)
    at Proxy.eval (eval at getFunction (/usr/local/lib/node_modules/n8n/node_modules/@n8n/tournament/dist/index.js:24:22), <anonymous>:6:75)
    at Tournament.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/tournament/dist/index.js:33:19)
    at evaluateExpression (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/ExpressionEvaluatorProxy.js:110:16)
    at Expression.renderExpression (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:217:70)
    at Expression.resolveSimpleParameterValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:195:34)
    at resolveParameterValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:276:25)
    at Expression.getParameterValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:293:31)
    at resolveParameterValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:274:29)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:282:61

Information on your n8n setup

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

Hi @marcel, I am sorry you’re having trouble. I assume your If node is configured to always output an item (so it sends an empty item to Set node, from which the Set node is then unable to read any properties)?

Should I be connecting the NoOp node to the same destinations as the set node?

This sounds like it might do the job, but this of course depends on what exactly you are doing in your workflow. Perhaps you can share a simplified workflow including suitable dummy data here on the forum using which your problem can be reproduced?