My use case:
When creating more complex workflows, especially when using HTTP Request nodes very quickly you find yourself duplicating nodes (or groups of nodes) that do almost the same thing over and over again.
Example use cases:
- Create a custom paginated HTTP request that uses predefined credentials, contains a base URL and accepts
path
parameter, then uses a Split Out node to return all items from all pages for a particular endpoint - Post Slack Update node that posts to a particular Slack channel using predefined credentials and already defines a complex message template using Block Kit, accepting only some fields that will be substituted
- Many, many others…
These use cases could be solved by writing my own custom nodes using code, but that is not available on the Cloud offering plus it requires programming knowledge, so it kind of defeats the purpose of a low-code tool.
Any resources to support this?
My idea on how this should work is as follows:
- In Workflow settings, there should be a “Use as a function” option
- All workflows marked with that option should appear when adding a new node under a new section called “Custom functions”
- Add a new trigger called
When called as a function
that triggers when this workflow is called from another workflow. It should let you define a list of input fields that this function will accept - When user adds a custom function node in their target workflow, this should result in a single custom node that’s similar to
Execute Workflow
node but already has the correct workflow selected and also accepts parameters that were defined in theWhen called as a function
of that function workflow.
This I believe would make it really easy to re-use logic across workflows and cover many use cases people have when creating complex workflows.
Are you willing to work on this?
I’m definitely willing to test this feature when it’s in alpha/beta.
Workarounds
Currently I’m using Execute Workflow
nodes to achieve the same effect, but it has several disadvantages:
- It requires you to supply workflow id every time, which requires you to visit the workflow list, copy the URL and extract the workflow id every time you want to use it
- It doesn’t accept any parameters, so in order to supply parameters I have to use an additional superficial
Code
node that just returns an object with the parameters I want to pass - There is no hint as to what parameters the sub-workflow accepts, so if I don’t remember their names I need to open that workflow and inspect it before I can use it
Prior art
I found at least two topics where people asked about a similar feature and I believe the described change would cover their use cases: