# Create a subflow with in- or output that can be disabled

**URL:** https://discourse.nodered.org/t/create-a-subflow-with-in-or-output-that-can-be-disabled/84154
**Category:** General
**Tags:** subflow
**Created:** [31 December 2023 13:15 UTC](https://discourse.nodered.org/t/create-a-subflow-with-in-or-output-that-can-be-disabled/84154 "2023-12-31T13:15:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![LukeSkywalker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lukeskywalker/32/86796_2.png) [@LukeSkywalker](https://discourse.nodered.org/u/LukeSkywalker)
#### Post date: [31 December 2023 13:15 UTC](https://discourse.nodered.org/t/create-a-subflow-with-in-or-output-that-can-be-disabled/84154/1 "2023-12-31T13:15:44Z")

</div>

Hello, I'm new to this forum.

I want to create a subflow and have the question if it is possible to disable the input or output?

If you take a look at the email-node, there it's possible to change the mailreceiving from seconds to "if triggered". Then an input appears. Is this behaviour also possible with subflows?

---

<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: [31 December 2023 13:43 UTC](https://discourse.nodered.org/t/create-a-subflow-with-in-or-output-that-can-be-disabled/84154/2 "2023-12-31T13:43:51Z")

</div>

Welcome to the forum @LukeSkywalker

If you don't want the subflow to have any inputs then set the input count to zero. Perhaps, however, I misunderstand the question. If so then please try to explain in more detail.

---

<div class="post-metadata">

### Author: ![LukeSkywalker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lukeskywalker/32/86796_2.png) [@LukeSkywalker](https://discourse.nodered.org/u/LukeSkywalker)
#### Post date: [31 December 2023 14:00 UTC](https://discourse.nodered.org/t/create-a-subflow-with-in-or-output-that-can-be-disabled/84154/3 "2023-12-31T14:00:27Z")

</div>

Ok, I try it:

I want to use a subflow for switching on and off lights and other switches. For switching, I need an output, but for setting the correct state to the dashboard switch, I also need an input. But I don't want to make two subflows. So the subflow must have both (input and output), but I never need both at the same time.

Just take a look at the email node as I desribed in my initial post, the the input can be enabled.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c74d3d96e68835dfbba0a7c13c3a32eefdffb7e3.png)

---

<div class="post-metadata">

### Author: ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)
#### Post date: [31 December 2023 14:37 UTC](https://discourse.nodered.org/t/create-a-subflow-with-in-or-output-that-can-be-disabled/84154/4 "2023-12-31T14:37:41Z")

</div>

No. The number of outputs of a subflow is a static property.

---

<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: [14 January 2024 14:38 UTC](https://discourse.nodered.org/t/create-a-subflow-with-in-or-output-that-can-be-disabled/84154/5 "2024-01-14T14:38:39Z")

</div>

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