# Is it possible to include credentials (env variables) in a flow json?

**URL:** <https://discourse.nodered.org/t/is-it-possible-to-include-credentials-env-variables-in-a-flow-json/100254>\
**Category:** Developing Nodes\
**Created:** [27 January 2026 10:01 UTC](https://discourse.nodered.org/t/is-it-possible-to-include-credentials-env-variables-in-a-flow-json/100254 "2026-01-27T10:01:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [27 January 2026 12:42 UTC](https://discourse.nodered.org/t/is-it-possible-to-include-credentials-env-variables-in-a-flow-json/100254/3 "2026-01-27T12:42:28Z")

</div>

Welcome to the forum @mattjcj

Have you looked at combining environment variables with [dynamic subscription](https://discourse.nodered.org/t/dynamic-mqtt-nodes-actions-connect-guidance-needed/58878/2) for the mqtt nodes?

Perhaps set the variables in the flow tab where they will be in plain text but unobtrusive.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/9/690f00c73b3e564f0632aaa7ff3f50c8ab823a7f.png).

Use a function node to retrieve them and connect/disconnect/publish/etc dynamically.

---

_[View the full topic](https://discourse.nodered.org/t/is-it-possible-to-include-credentials-env-variables-in-a-flow-json/100254)._
