# How to modify node-red deploy operation to save flow to database

**URL:** https://discourse.nodered.org/t/how-to-modify-node-red-deploy-operation-to-save-flow-to-database/26568
**Category:** Core Development
**Created:** [13 May 2020 05:37 UTC](https://discourse.nodered.org/t/how-to-modify-node-red-deploy-operation-to-save-flow-to-database/26568 "2020-05-13T05:37:31Z")
**Posts on this page:** 4
**Page:** 3

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [13 May 2020 12:46 UTC](https://discourse.nodered.org/t/how-to-modify-node-red-deploy-operation-to-save-flow-to-database/26568/41 "2020-05-13T12:46:40Z")

</div>

I'd even prefer the solution @bakman2 and @Colin presented, by watching the file from within a flow and send it to that API. Nice and clean.

I don't see any reasonable need to modify the core code for this API call.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [13 May 2020 14:26 UTC](https://discourse.nodered.org/t/how-to-modify-node-red-deploy-operation-to-save-flow-to-database/26568/42 "2020-05-13T14:26:52Z")

</div>

so this flow is watching itself ? Fine until someone deletes that part of the flow.  
If the end goal really is to do something multi-user (as per [How to modify node-red deploy operation to save flow to database](https://discourse.nodered.org/t/how-to-modify-node-red-deploy-operation-to-save-flow-to-database/26568/30)) then using the API is the correct way forward.  
Unless the users are people you can afford to upset.

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [13 May 2020 18:09 UTC](https://discourse.nodered.org/t/how-to-modify-node-red-deploy-operation-to-save-flow-to-database/26568/43 "2020-05-13T18:09:11Z")

</div>

That watcher could run in a separate Node-RED instance solely for that purpose. 😅

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [12 July 2020 18:09 UTC](https://discourse.nodered.org/t/how-to-modify-node-red-deploy-operation-to-save-flow-to-database/26568/44 "2020-07-12T18:09:19Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/how-to-modify-node-red-deploy-operation-to-save-flow-to-database/26568.md?page=2)
