Describe the problem/error/question
I have a contact list in Notion, building a n8n flow that trigger on and entries being updated in notion, then checks if it should go to Xero, 365 and/or Google contacts. Then for each it checks if the entry already exists and if not creates it, if it does it updates it.
It works if only one entry goes through at a time.
It works if multiple entries go through and they all already exist and just need updating.
The issue is that if they don’t exist then the lookup just returns a single blank output to my if node, then when it tries to do the create node looking back at the notion trigger for data it doesn’t know which entry to use anymore since the lookup node broke the chain.
I don’t know how to work around this… any idea?
I didn’t originally have the loop splitting it into batches of 1, I added that thinking it might help the issue… but it does not since it still has no chain back. Also that adds a new problem where even when only a single notion entry comes through the loop adds a second empty loop.
What is the error message (if any)?
Multiple matching items for expression [item 0]
An expression here won’t work because it uses .item
and n8n can’t figure out the matching item. (There are multiple possible matches)
Try using .first()
, .last()
or .all()[index]
instead of .item
or reference a different node.
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
- n8n version: 1.48.3
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main): idk
- Running n8n via (Docker, npm, n8n cloud, desktop app): Cloudron
- Operating system: desktop os: windows 11, server os: ubuntu