# How can my custom node have dynamic number of outputs?

**URL:** <https://discourse.nodered.org/t/how-can-my-custom-node-have-dynamic-number-of-outputs/20256>\
**Category:** Developing Nodes\
**Created:** [13 January 2020 11:00 UTC](https://discourse.nodered.org/t/how-can-my-custom-node-have-dynamic-number-of-outputs/20256 "2020-01-13T11:00:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 January 2020 11:02 UTC](https://discourse.nodered.org/t/how-can-my-custom-node-have-dynamic-number-of-outputs/20256/2 "2020-01-13T11:02:33Z")

</div>

Hi @Steve-Mcl

the trick is to add a property to your node's `defaults` object called `outputs`.

You can then modify `this.outputs` as you would any other node property. The editor knows to watch that property and update the node accordingly.

NIck

---

_[View the full topic](https://discourse.nodered.org/t/how-can-my-custom-node-have-dynamic-number-of-outputs/20256)._
