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 user.node.escalation.email
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