# When I click on deploy button in node-red I want JSON file to be saved in database

**URL:** <https://discourse.nodered.org/t/when-i-click-on-deploy-button-in-node-red-i-want-json-file-to-be-saved-in-database/61794>\
**Category:** General\
**Tags:** database\
**Created:** [26 April 2022 10:20 UTC](https://discourse.nodered.org/t/when-i-click-on-deploy-button-in-node-red-i-want-json-file-to-be-saved-in-database/61794 "2022-04-26T10:20:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![atmar](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@atmar](https://discourse.nodered.org/u/atmar)\
**Post date:** [26 April 2022 10:20 UTC](https://discourse.nodered.org/t/when-i-click-on-deploy-button-in-node-red-i-want-json-file-to-be-saved-in-database/61794/1 "2022-04-26T10:20:13Z")

</div>

when I click on deploy button in node-red I want JSON file to be saved in database without calling an API. How can I modify deploy button functionality to save it directly?

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [26 April 2022 10:43 UTC](https://discourse.nodered.org/t/when-i-click-on-deploy-button-in-node-red-i-want-json-file-to-be-saved-in-database/61794/2 "2022-04-26T10:43:56Z")

</div>

You implement a storage plugin based on this API [Storage API : Node-RED](https://nodered.org/docs/api/storage/)

"without calling an API" is a meaningless statement here, you will always need to call an API somewhere.

Explain in more detail the problem you are actually trying to solve here, as the context will be important.

Are you trying to use just the Node-RED editor without the runtime?

---

<div class="post-metadata">

**Author:** ![atmar](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@atmar](https://discourse.nodered.org/u/atmar)\
**Post date:** [28 April 2022 06:40 UTC](https://discourse.nodered.org/t/when-i-click-on-deploy-button-in-node-red-i-want-json-file-to-be-saved-in-database/61794/3 "2022-04-28T06:40:51Z")

</div>

okay! I have embedded the node red and when hitting localhost:8080/red/flows I am able to view the JSON file created. I want to save this file to the sql DB so what ate the steps I will need to follow so I can save this file.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [28 April 2022 07:51 UTC](https://discourse.nodered.org/t/when-i-click-on-deploy-button-in-node-red-i-want-json-file-to-be-saved-in-database/61794/4 "2022-04-28T07:51:35Z")

</div>

It's still not clear what you are actually doing, but as I've said if you want the flow stored in a database, then you have to write a storage plugin using the API I linked to in the first answer that connects to the database

---

<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:** [27 June 2022 07:52 UTC](https://discourse.nodered.org/t/when-i-click-on-deploy-button-in-node-red-i-want-json-file-to-be-saved-in-database/61794/5 "2022-06-27T07:52:15Z")

</div>

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