I have a Rest API Call node at the top of my workflow. It has a query param called "api_key". For the next node, I have a branch node. I thought it would be simple to have an "if" statement with the branch.
So, in the branch node, I have this code: ctx["root"]["request"]["query"].api_key == '12345'
Then, on the true branch, I go ahead and run my next bit of code. On the false branch, I just return a message.
No matter what I do, I can't get a simple if statement to work. It says it is a javascript so I have tried to do a simple if statement in JS as well:
if (ctx["root"]["request"]["query"].api_key == 'HRauoD4QypplwAfiev7NnSeITtbIiMXX') {
return true;
} else {
return false;
}
But, that just returns an error as well. This is very confusing for a simple branch node. But, nothing seems to be working? What am I doing wrong here?