Trying to move data from one database to another, when data present in database 1 but not in database2, create node to run when data present in both database change node to run.
However both node running regardless of data presence
What is the error message (if any)?
no error message
Please share the workflow
(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)
Share the output returned by the last node
Information on your n8n setup
n8n version: latest version
Database you’re using (default: SQLite):
Running n8n with the execution process [own(default), main]: default
Running n8n via [Docker, npm, n8n.cloud, desktop app]: aks
That’s because the merge node expects items on input1 which are not there on the false branch of your if node.
With that, the merge node tries to execute the true branch to get data on input1.
I did not think your whole workflow through, so I do not know how you can use the compare datasets node in this case.
But for a quick fix, you probably just have to connect the “Return cursor and amount” node just before the merge node on the false branch directly to the “code” node after the merge node. Like this:
That would not merge the data from missing product count and changed count, we would need the count of both missing and changed and created in the other workflow as an output.