I suspect what is happening here is the merge node is checking to see what the value is of the previous node and to do that it needs to run it if it has not ran before. The merge node needs to have 2 inputs to work, I am sure this is something we can improve in the future but for now it may be worth thinking about another way to structure the workflow.
Set space went off because when the merge node triggered the if to get the second source it is using the value from the node above it looking at the expression which evaluated to true.
What is the workflow trying to do, there could be another way to handle it that is a bit neater. Are the merges even needed?
I’m using the data from Find contact to update data in HubSpot (increment or append). So I just needed to be sure the node went off first. I added No Op nodes - this should fix the problem:
That looks better, You could remove the no-op nodes as well as you don’t really need them. If you look at output 2 on your switch node you are going to to the no-op node and to the update directly so that will in theory update twice which you may not want.
A real lazy way to handle it would be to have the Find Contact node in line so each of the 4 outputs calls that first before moving to the next step. It does mean the node is there multiple times but it will always work.
Sorry - missed the extra line for Output 2!
The problem with having the Find contact on every line is I lose the information from earlier in the workflow (the WF is triggered by a webhook), and I try to avoid using $node as much as possible.
Here I am using $node for Find contact though, but I’m only looking for 1 piece of information from it, instead of the 4-6 other keys from earlier in the workflow
Ah ok, I tend to use the $node option. Although in this case if you used that node in line as everything after isn’t changing the data you should be able to just use $json["value"] which may be easier.