# Email node IDs and openwethermap API KEY disappears when copy flow.json

**URL:** <https://discourse.nodered.org/t/email-node-ids-and-openwethermap-api-key-disappears-when-copy-flow-json/58979>\
**Category:** General\
**Created:** [25 February 2022 13:03 UTC](https://discourse.nodered.org/t/email-node-ids-and-openwethermap-api-key-disappears-when-copy-flow-json/58979 "2022-02-25T13:03:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [25 February 2022 13:03 UTC](https://discourse.nodered.org/t/email-node-ids-and-openwethermap-api-key-disappears-when-copy-flow-json/58979/1 "2022-02-25T13:03:00Z")

</div>

Hi,

I'm using these node packages :

```auto
        "node-red-node-email": "~1.14.0",
        "node-red-node-openweathermap": "~0.5.1"

```

When i work in multi-users, and i copy original flow in an userDir, i see that this tow node lost his parameters.

- Send email node lost id and password of the email account,
- and OpenWeatherMap node lost his API key.

I must to enter manualy for each user. This is not awesome.  
I have seek in the module package to see where is stored these parameters, but i don't understand.

Necessarily, there is a file where that node extra parameters are stored ?!

Perhaps, there is a solution to store this settings for example from the `functionGlobalContext` in the settings.js file ? Or other way ?

Thanks,

---

<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:** [25 February 2022 13:22 UTC](https://discourse.nodered.org/t/email-node-ids-and-openwethermap-api-key-disappears-when-copy-flow-json/58979/2 "2022-02-25T13:22:16Z")

</div>

Anything marked as a credential by the node is not stored in the flow file. This is a deliberate choice.

They are also never made available to the editor after they are entered the first time so will not be included if you select nodes and choose the export option in the editor.

These values are encrypted and stored in the `flow_creds.json` file that will be in the useDir next to the `flow.json`

The encryption key for this file is either in the `.config.runtime.json` file if you have not manually added one to the `settings.js` file.

---

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [25 February 2022 16:46 UTC](https://discourse.nodered.org/t/email-node-ids-and-openwethermap-api-key-disappears-when-copy-flow-json/58979/3 "2022-02-25T16:46:13Z")

</div>

This is, that i missed !!

So, i have just test you fix with succes, and i add this below for others :

- You need to enable and set a personal secret key in the settings.js file.
- Then configure all node with any credential, and deploy.
- After, for a new instance of user, copy / paste into is userDir :
  - settings.js
  - flow.json
  - flow\_cred.json.

Thank you very much @hardillb, clear and precise

😉

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 February 2022 16:59 UTC](https://discourse.nodered.org/t/email-node-ids-and-openwethermap-api-key-disappears-when-copy-flow-json/58979/4 "2022-02-25T16:59:42Z")

</div>

It is usually best to copy everything across except the node\_modules folder, and then to go into the folder and run  
`npm install`  
which will install any extra nodes you need.

If you don't copy package.json across then if you run an npm command in the new one (to install a new node-type for example) it will uninstall any extra nodes you had installed in the master.

---

<div class="post-metadata">

**Author:** ![corso66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/corso66/32/41143_2.png) [@corso66](https://discourse.nodered.org/u/corso66)\
**Post date:** [26 February 2022 16:41 UTC](https://discourse.nodered.org/t/email-node-ids-and-openwethermap-api-key-disappears-when-copy-flow-json/58979/5 "2022-02-26T16:41:12Z")

</div>

Yes @Colin, you explained me that before 😉 thanks again.

In multi-users instances, i link each node\_modules user folder to a unique node\_modules in a admin .node-red folder.  
So i make npm install or update in this folder only, and consider that all users use the same flow and their node-red éditor disabled.  
In this case only, i copy this three files on each userDir folder.

---

<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:** [12 March 2022 16:41 UTC](https://discourse.nodered.org/t/email-node-ids-and-openwethermap-api-key-disappears-when-copy-flow-json/58979/6 "2022-03-12T16:41:50Z")

</div>

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