Hello everyone, is there a built-in way in N8N Expressions to retrieve the output rule number (0, 1, 2, 3) of the previous step node (Switch)?
Not the Output Data just the number of rule that used to output data
Hello everyone, is there a built-in way in N8N Expressions to retrieve the output rule number (0, 1, 2, 3) of the previous step node (Switch)?
Not the Output Data just the number of rule that used to output data
Hi @anas, you can query this information using an expression of {{ $prevNode.outputIndex }}
. Check out this example workflow:
No matter to which output you connect the Set node, once you run the workflow it’ll “know” where the previous item came from.
Hope this helps!