How to determine the invoking workflow

On another entry I’ve explained why we’ve created a workflow to centralize all of our notifications to chat, rocket.chat in our case: Continue on errors not working if credential errors?

I have not found any doc regarding options to see which other workflow triggered. I attach a similar workflow. We set default values in case they are not returned by the previous workflow or webhook and then we send to $channel with $msg. If it fails we send an email.

What I was trying to archive was to include if the call was coming from the webhook (perhaps the referer) or which other workflow was the one that triggered this notifications.

If we debug the Execute Workflow Trigger there is no reference at all about the invoking trigger. Just wondering if this is something available or again, this might be more a feature request.

Hi @luison, that’s a tricky one. n8n makes quite a bit of metadata available through expressions, but not which workflow would have called the current workflow.

So I’d suggest you simply add this information in the workflow calling your example workflow. You could for example add a Set node before your “Execute Workflow” nodes, providing the information you’re looking for in a new field which is then passed on to your sub-workflow.

1 Like

Thanks. Yes that is what we are doing now.
As a suggestion, it would make sense to have that metadata available on the workflows, specially once you start to group specialized workflows in the form of functions to share. At least maybe info on which node triggered the workflow, as could be various, referer, datetime, etc could be useful for info or conditions.

1 Like

Yeah, I can see how this can be useful. I’ll convert your question into a feature request so you and other users can leave their vote on it :slight_smile: