Perform action when flow is changed


I have a node-red instance running both on cloud and on-prem, running multiple flows.
The on-prem is an emergency solution for a connectivity-loss event.

What I'm looking for is a way to have an event trigger once I deploy, sending only the changed flow as a json file.

So for example, I have flows x,y,z, each running tasks for a different edge "location". If I perform a change on flow x, I want only that flow to be exported to a JSON format and to trigger an event with that file (sending it to the client using that flow, for example).

Any ideas?

Thank you for your time.

You could use the watch node to watch for changes to the flow file. Then use that event to trigger your action(s).

It is worth noting though that a save event may result in multiple filing system changes to a file. It is safest to delay a copy by a couple of seconds after a watch event fires.

@TotallyInformation that sounds like a good idea. thank you .
Will try it out in the coming days and update if it worked.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.