# How can I avoid duplicate configuration node names?

**URL:** https://discourse.nodered.org/t/how-can-i-avoid-duplicate-configuration-node-names/84249
**Category:** Developing Nodes
**Created:** [3 January 2024 11:37 UTC](https://discourse.nodered.org/t/how-can-i-avoid-duplicate-configuration-node-names/84249 "2024-01-03T11:37:44Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)
#### Post date: [3 January 2024 12:28 UTC](https://discourse.nodered.org/t/how-can-i-avoid-duplicate-configuration-node-names/84249/2 "2024-01-03T12:28:54Z")

</div>

Hi,  
I'm not sure I understood everything.

The node name is purely visual and should not be used to identify a node in the code. This is the job of the id.

It's possible to increment but only if you have developed the node. Otherwise you have to add an "nodes:add" [event](https://nodered.org/docs/api/ui/events) which when you add this node, updates the name by modifying the node properties.

```js
RED.events.on("nodes:add", (node) => {
  // Skip if not your node
  if (node.type !== "your-type") return;

  // check if name exist with
  // RED.nodes.eachNode
  // then update it
  node.name = "new name"
});

```

---

_[View the full topic](https://discourse.nodered.org/t/how-can-i-avoid-duplicate-configuration-node-names/84249)._
