Just to know if some nodes intregrate (or could integrate) a test inside (on stdout value, success/failure, etc…), yes with 2 ou more (for values) ouput arrows to the next nodes
I feel this functionality could miss sometimes, just to make WFs more concise … no ?
Is the IF node alone to make tests ? Thanks
There is also the Switch-Node which has 4 outputs:
Great thanks jan, useful!
And in such conditional noded (IF/Switch), it is possible to set params to values, used in next nodes ?
For example, i could set $targetServer to “vm1” or “vm2” or “vm3” … but is it possible to use something like $targetServer in n8n ? via the environment ?
Yes I could une the Function node to output this value (or several ones) and use it later but I must give the expression {$node[“Fubtion”].json[etc … each time, heavy no ?
I can get env with $env, but do I have to always use a Function node to set an env variable ? And how ?
Is this a good practice ?..
And in such conditional noded (IF/Switch), it is possible to set params to values, used in next nodes ?
No that is not possible with the IF/Switch Node. For that a Set Node should be used. You can also then use the value you did set on that node in the IF/Switch Node that follows.
Yes I could une the Function node to output this value…
Sorry, do not understand.
I can get env with $env …
You mean setting an actual environment variable? I am right now not sure that is possible at all right now as the code gets executed in an own secure sandbox.
Ok thanks jan