Programmatically generate flows?

#1

Is there anyway to programmatically generate nodes/flows outside of creating a large JSON blob via the APIs exposed in the node-red npm package? For instance, could I programmatically create a flow then add nodes to it simlar to this:

flow.addNode('httpRequest', {method: POST,..., wires: []

If not, is there a way for developers to programmatically access the special parameters associated with a particular type of node? I see that there is a registerType function that allows users to specify the special parameters associated with a new node, but I would like to be able to tell the special parameters that an inject node has that a debug node does not.

0 Likes