# "onDeploy" callback at the node level

**URL:** <https://discourse.nodered.org/t/ondeploy-callback-at-the-node-level/29983>\
**Category:** General\
**Created:** [13 July 2020 09:13 UTC](https://discourse.nodered.org/t/ondeploy-callback-at-the-node-level/29983 "2020-07-13T09:13:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavithra\_nayak](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@Pavithra\_nayak](https://discourse.nodered.org/u/Pavithra_nayak)\
**Post date:** [13 July 2020 09:13 UTC](https://discourse.nodered.org/t/ondeploy-callback-at-the-node-level/29983/1 "2020-07-13T09:13:31Z")

</div>

Hi,  
I am new Node-red, I have a requirement where in I need to do some processing in each custom node, when the node is deployed successfully. I don't see any callback on Deploy. at the node level. Could you please guide me on this.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [13 July 2020 09:17 UTC](https://discourse.nodered.org/t/ondeploy-callback-at-the-node-level/29983/2 "2020-07-13T09:17:45Z")

</div>

Hi @Pavithra_nayak

whenever a new set of flows are deploy all of the existing node objects are discarded and new node objects created. So your node constructor will be called to create those new instances.

If the user does a modified-nodes/flows type of deploy, then any unmodified nodes will not be touched and will not know the deploy is happening.

---

<div class="post-metadata">

**Author:** ![Pavithra\_nayak](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@Pavithra\_nayak](https://discourse.nodered.org/u/Pavithra_nayak)\
**Post date:** [13 July 2020 09:59 UTC](https://discourse.nodered.org/t/ondeploy-callback-at-the-node-level/29983/3 "2020-07-13T09:59:06Z")

</div>

Thanks for the reply. The solution works for me.

---

<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 July 2020 09:59 UTC](https://discourse.nodered.org/t/ondeploy-callback-at-the-node-level/29983/4 "2020-07-27T09:59:07Z")

</div>

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