Autostart node on deploy

Hello,

is it possible to autostart a function (function node) or when writing a new node sending automatically a message on deploy event ?

Is can be an invisible inject feature

I don't know if it can be done in a function node but you can do it if your writing your own node - the node-red-contrib-config does it

I think its the marked bit of code but not totally sure

Why the need for an invisible inject?

1 Like


Will the "inject once" button work for your use case?

the inject once feature implies a very visible and not to foget node, it what try to avoid...
Thx

You can make it smaller or even hide it underneath :slight_smile:

image

Is there a specific reason why you want it to be invisible? With it invisible in the editor it might be harder to maintain on the longer term, but if it is inside a custom node you can document it easier. For maintenance that might be your best solution

visible is not the right word in fact. I want to spontaneously generate event at startup of a flow.

What exactly do you mean by "startup of a flow".