# Configure Node properties of a Subflow

**URL:** <https://discourse.nodered.org/t/configure-node-properties-of-a-subflow/36049>\
**Category:** General\
**Created:** [17 November 2020 10:34 UTC](https://discourse.nodered.org/t/configure-node-properties-of-a-subflow/36049 "2020-11-17T10:34:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thewilli](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@thewilli](https://discourse.nodered.org/u/thewilli)\
**Post date:** [17 November 2020 10:34 UTC](https://discourse.nodered.org/t/configure-node-properties-of-a-subflow/36049/1 "2020-11-17T10:34:04Z")

</div>

Hi!

I am using [node-red-contrib-alexa-remote2](https://flows.nodered.org/node/node-red-contrib-alexa-remote2) to control my Alexa Echo and connected Smart Home devices as a first useful way to explore Node-RED. It provices a Node (amongst others) to control a single Smart Home device. Let's have a look on how the Node properties look like if I wanted to turn my Kitchen light off.

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/3/635554b315377db2b0cac8419106f17a988d6fb1.png)

Unfortunately there is no _toggle_, only allowing for turning a light on or off. I took this as an oppurtunity to get into _subflows_.

My idea is to create a subflow that takes the Account (global configuration node, as far as I understand) and device name or id. It consists of 3 Alexa nodes: The first one queries the current state of the target device (on / off). A _switch_ node then either triggers the _turn device on_ or _turn device off_ node.

While I understand that I can use environment variables for subflow configuration, I don't understand how I could somehow _inject_ those values into the Alexa Nodes, configuring the Account and device in a dynamic way.

Is there some API to access a Node's configuration and some _init code_ of a subflow where I could do this?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![alexk111](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alexk111/32/16891_2.png) [@alexk111](https://discourse.nodered.org/u/alexk111)\
**Post date:** [3 December 2020 15:12 UTC](https://discourse.nodered.org/t/configure-node-properties-of-a-subflow/36049/2 "2020-12-03T15:12:25Z")

</div>

Voting up this feature request. It would be so useful to be able to pick config-nodes for nodes inside a subflow using subflow properties.

---

<div class="post-metadata">

**Author:** ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)\
**Post date:** [3 December 2020 19:56 UTC](https://discourse.nodered.org/t/configure-node-properties-of-a-subflow/36049/3 "2020-12-03T19:56:04Z")

</div>

I'm not 100% this works, but I recall @knolleary mentioning it was possible to edit the subflow's JSON and change the value of Account for example ton an env var (${YOURVAR})  
would need to test this though...

---

<div class="post-metadata">

**Author:** ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)\
**Post date:** [3 December 2020 20:05 UTC](https://discourse.nodered.org/t/configure-node-properties-of-a-subflow/36049/4 "2020-12-03T20:05:35Z")

</div>

Just tried and it doesn't seem to work

---

<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:** [1 February 2021 20:05 UTC](https://discourse.nodered.org/t/configure-node-properties-of-a-subflow/36049/5 "2021-02-01T20:05:40Z")

</div>

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