How to detect the Execution Trigger?

Hey guys,

I approached a use case where a subprocess can be triggered by a Start-Node or several Webhooks. Within the process it is necessary to determine the triggered node. How can I do this in an IF-Node for example?

trigger

Thank you!

Hey @BenW, I’d simply add a Set node after each trigger, writing a value of triggeredBy or something along these lines:

image

You’d then be able to use the IF node to check for the triggeredBy value previously set.

Yeah, but this is a solution making the workflow itself more complex. I thought there could be a solution on a code or meta level like $node[‘webhook’].hasRun or something like that. But nonetheless, your solution should work.

That is currently sadly not possible but could be made possible as soon as this PR got merged. It then automatically adds source information to the flow data which can then be queried.