Describe the problem/error/question
I am making a workflow that compares two datasets to update a database. This all runs happens on Supabase. For this I am using the “Compare” node and comparing by a unique code. Input A would be the previous item set, Input B would be the current item set. If an item is in A only then the row should be deleted, if it is in B only a row should be created and if it is in both (here I only use same, as it would never be different), the row should be updated. Now the issue is that very rarely there will be a delete or create execution, but I would still like to run it every time to have a more reliable ouput. This means that usually there will be no items going through the “in A only” and “in B only” branches. But I want all processes to finish and then to execute the next workflow. For this I use a “Merge” node, with 3 inputs, set to “wait for all inputs” before the “Execute Workflow” node. However if no items go down the branches, there is no input for the merge node and the workflow hangs. I tried using the “Always Output Data” of the “Compare” node, but it annoyingly only outputs one empty item to the A branch, which leaves the B branch empty still. Is there a simple fix to this that I am overlooking or should I scrap the idea and come up with a different approach? I am still quite new to n8n so I might be missing something obvious.
Please share your workflow
Share the output returned by the last node
The output would typically be just the “update row” node passing the items, which means that only one input of the “merge” node will arrive.
Information on your n8n setup
- n8n version: 1.99.1
- Database (default: SQLite): unchanged
- n8n EXECUTIONS_PROCESS setting (default: own, main): unchanged
- Running n8n via (Docker, npm, n8n cloud, desktop app): VPS
- Operating system: Windows 10