I have the following setup. It gets passed some items and based if a property is set the if node decides if the “update” or the "create path is taken. If the “Update Moco Company” node is successfully executed, it returns the same input as originally input - of course updated.
What i am trying to achieve is to always get back the input items in the updated state if applicable. Thats why I merge the input items at the bottom path and the merge node is configured to only keep items of input 1. The output of that merge is than merged with the output of the update path at the top. i think conceptionally this should work.
However, there might be cases where there are no updates or no creates at all. Meaning, one path might not return anything. The merge will never work. Even when setting the nodes to always return an output, the merge node still cannot combine the inputs since the item on one path will be an empty object.
The other thing I do not get is why the upper path is executed once when no items passed the true case of the if node.
Thank you very much for any feedback. I am really having a hard time wrapping my head around this.
Information on your n8n setup
- n8n version:0.225.1
- Database (default: SQLite):postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):cloudron