# Any way to set ENV var in template node?

**URL:** https://discourse.nodered.org/t/any-way-to-set-env-var-in-template-node/87728
**Category:** Dashboard
**Created:** [5 May 2024 17:04 UTC](https://discourse.nodered.org/t/any-way-to-set-env-var-in-template-node/87728 "2024-05-05T17:04:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![WineProduction](https://avatars.discourse-cdn.com/v4/letter/w/f1d935/32.png) [@WineProduction](https://discourse.nodered.org/u/WineProduction)
#### Post date: [5 May 2024 17:04 UTC](https://discourse.nodered.org/t/any-way-to-set-env-var-in-template-node/87728/1 "2024-05-05T17:04:20Z")

</div>

Hi, is there any way to set ENV variables in template instead of having to send them to the node as a msg?

Thanks

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [5 May 2024 17:23 UTC](https://discourse.nodered.org/t/any-way-to-set-env-var-in-template-node/87728/2 "2024-05-05T17:23:41Z")

</div>

No, that's not what the template node is for.

Tbh, your question is a little unclear. did you mean "get" (use) env vars in a template? Because env vars are set once (they are not variable)

---

<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: [4 June 2024 17:23 UTC](https://discourse.nodered.org/t/any-way-to-set-env-var-in-template-node/87728/3 "2024-06-04T17:23:42Z")

</div>

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