Modular nodes & sub-workflow as another node

The idea is:

Consider sub-workflow itself as a node. Combine sub-workflows to create the main workflow

My use case:

We find n8n is great for small and medium workflows. But when it comes to complex and large workflows the nodes and connectors are so many it is quite hard to redesign and re-use.

In our case, let’s say we have a workflow and we want to escalate the issue. Some cases may have Email Escalation or Pager Duty escalation or BOTH. But we don’t want to create the escalation details everytime. We have a pre-defined “Email Escalation sub-workflow” and all it needs is an pre-defined set of inputs

We hold that code as a sub-module in github and everytime a workflow is developed, we copy the code and attach to the rest which is ugly.

I think it would be beneficial to add this because:

Suggestion is to consider the sub-workflow as a NODE itself… Basically user-defined node
So end of day the previous stage will call another ‘user-defined node’ (i.e Escalation sub-workflow in my case)

So in the above case, the ‘Email Escalation’ sub-workflow should be considered as a and ‘PagerDuty Escalation’ should be user.node.escalation.pagerduty something of that style. So end of the day, the user just have to stitch together these sub-workflows and create a robust workflow

Hi @getk

I think there was another feature request for this.
Have you had a look at sub workflows with the use of the execute workflow node?
This is the way to do the subworkflows at the moment. Not sure what your feature request would add to that.

Please have a look and explain the difference. :slight_smile:

hi @BramKn thanks for quick response. Is it possible to give a link for ‘sub workflow + execute node’? I can then analyse the difference.

sorry, but you can find the node your self I hope.
an image I just posted for another topic.

1 Like

ah.ok. thanks @BramKn . I think it looks similar. I will analyze the difference

1 Like