# How to create a node with properties in external files

**URL:** <https://discourse.nodered.org/t/how-to-create-a-node-with-properties-in-external-files/26263>\
**Category:** Developing Nodes\
**Created:** [7 May 2020 20:17 UTC](https://discourse.nodered.org/t/how-to-create-a-node-with-properties-in-external-files/26263 "2020-05-07T20:17:59Z")\
**Posts on this page:** 8\
**Page:** 3

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [12 May 2020 18:06 UTC](https://discourse.nodered.org/t/how-to-create-a-node-with-properties-in-external-files/26263/42 "2020-05-12T18:06:31Z")

</div>

> [@ristomatti](#):
>
> mystical background process

You will need to ask @JGKK. It is even more secret than the coca-cola recepy 🤫

---

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [12 May 2020 18:18 UTC](https://discourse.nodered.org/t/how-to-create-a-node-with-properties-in-external-files/26263/43 "2020-05-12T18:18:00Z")

</div>

Its not all that secret @BartButenaers 😄 Ok lets clear up some things.  
Its not classical config files like you are all probably thinking about.  
The files we are talking about are text data that defines voice commands with a simplified jsgf grammar [https://www.w3.org/TR/jsgf/](https://www.w3.org/TR/jsgf/)  
The main file isn’t the problem as this will most probably be written by the person using the node from our node config through ace.  
The edge cases that is generating the head aches for @BartButenaers are the so called slot files. Those are values that can be referenced in the main sentences file described above.  
Those files can contain anything from a list of cities or the numbers from one too one hundred.  
So why would they be changed automatically by some process? Here is just one example:  
Imagine you want to use voice commands to drive your media player. So you create some script that watches your media server and when a new file is added it adds the artist to your artist slot and the songs to the songs slot file automatically.  
Another one:  
You have a smarthome system like openhab and want to turn off and on lights with your voice. So you create something there that automatically adds to your lights slot file when you add a new light in the system.  
I know those are edge cases. But they are possible.  
I hope this clears up some of the confusion about what we are actually doing.  
Johannes

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [12 May 2020 18:39 UTC](https://discourse.nodered.org/t/how-to-create-a-node-with-properties-in-external-files/26263/44 "2020-05-12T18:39:43Z")

</div>

> [@JGKK](#):
>
> watches your media server

👍 👍 👍

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [12 May 2020 19:05 UTC](https://discourse.nodered.org/t/how-to-create-a-node-with-properties-in-external-files/26263/45 "2020-05-12T19:05:24Z")

</div>

Thanks for the explanation. I still don't see the issue if NR only modifies the main config file and the background processes the slot files. So when does the possible conflict come up?

I'm pretty sure I'm just tired and missed the part so nevermind. 😴

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [12 May 2020 19:11 UTC](https://discourse.nodered.org/t/how-to-create-a-node-with-properties-in-external-files/26263/46 "2020-05-12T19:11:08Z")

</div>

> [@ristomatti](#):
>
> So when does the possible conflict come up?

I think that in this last setup all conflicts are resolved. In my first drawing there were a couple of conflicts. So it was a useful discussion for us...

---

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [12 May 2020 19:15 UTC](https://discourse.nodered.org/t/how-to-create-a-node-with-properties-in-external-files/26263/47 "2020-05-12T19:15:51Z")

</div>

Because we also wanted to enable the editing and adding of those slot files from within our config node.

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [12 May 2020 19:22 UTC](https://discourse.nodered.org/t/how-to-create-a-node-with-properties-in-external-files/26263/48 "2020-05-12T19:22:56Z")

</div>

OK now it makes more sense, thanks!

---

<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:** [11 July 2020 19:24 UTC](https://discourse.nodered.org/t/how-to-create-a-node-with-properties-in-external-files/26263/49 "2020-07-11T19:24:11Z")

</div>

Closed on 11 July 2020 19:24 UTC

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-create-a-node-with-properties-in-external-files/26263.md?page=2)
