Hey n8n community,
Can anyone explain why this IF node data is not accessible when I use a $ifEmpty() expression?
The node returns undefined even though there is data and if I access without the $ifEmpty() expression the data is read without issue.
Steps
- I’m checking if the user exists in my DB then using the IF node to funnel based on the outcome.
- If TRUE, the output is an empty array, therefore I thought the $ifEmpty() would be perfect for this as if FALSE the node branches to a create user node.
- At the stage where I’m getting the error there will always be data returned either from the TRUE OR FALSE outcome.
- I’ve even tried just declaring $json.id since there will always be an id but this also causes undefined to be returned.
- I’ve also tried accessing the node directly by name
Flow
Error
Information on your n8n setup
- n8n version: 1.80.5
- Database:SQLite
- n8n EXECUTIONS_PROCESS setting:own, main
- Running n8n via :Docker
- Operating system: Linux Ubuntu 20.04