# Subflows inputs and outputs

**URL:** <https://discourse.nodered.org/t/subflows-inputs-and-outputs/49072>\
**Category:** General\
**Created:** [29 July 2021 09:33 UTC](https://discourse.nodered.org/t/subflows-inputs-and-outputs/49072 "2021-07-29T09:33:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan9235](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@Dan9235](https://discourse.nodered.org/u/Dan9235)\
**Post date:** [29 July 2021 09:33 UTC](https://discourse.nodered.org/t/subflows-inputs-and-outputs/49072/1 "2021-07-29T09:33:44Z")

</div>

When creating a subflow, node-red allows me to define multiple inputs and outputs.  
However, when I use the subflow within a flow, it only displays one input. Why?

In addition, while trying to link other nodes or subflows to the outputs, node-red always links all the links to the top output. why?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [29 July 2021 09:58 UTC](https://discourse.nodered.org/t/subflows-inputs-and-outputs/49072/2 "2021-07-29T09:58:38Z")

</div>

Hi @Dan9235

You cannot create multiple inputs for a subflow:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/2/e2cd3194ddae50d15224a63a05ce7900fd740f40.png)

The toolbar lets you select `0` or `1` input.

> [@Dan9235](#):
>
> In addition, while trying to link other nodes or subflows to the outputs, node-red always links all the links to the top output. why?

Can you describe what you mean a bit more? Perhaps provide a screenshot that shows what you are doing?

---

<div class="post-metadata">

**Author:** ![Dan9235](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@Dan9235](https://discourse.nodered.org/u/Dan9235)\
**Post date:** [29 July 2021 13:07 UTC](https://discourse.nodered.org/t/subflows-inputs-and-outputs/49072/3 "2021-07-29T13:07:20Z")

</div>

Tx

And what about the links to the outputs?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [29 July 2021 13:12 UTC](https://discourse.nodered.org/t/subflows-inputs-and-outputs/49072/4 "2021-07-29T13:12:40Z")

</div>

> [@knolleary](#):
>
> Can you describe what you mean a bit more? Perhaps provide a screenshot that shows what you are doing?

🙂

..............

---

<div class="post-metadata">

**Author:** ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)\
**Post date:** [29 July 2021 18:04 UTC](https://discourse.nodered.org/t/subflows-inputs-and-outputs/49072/5 "2021-07-29T18:04:18Z")

</div>

I think they are referring to when you drag a wire from the input of a node to another node but not directly on an output, it will default to the first output. However, I assume this is the intended behavior as it is most logical.

---

<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:** [27 September 2021 18:04 UTC](https://discourse.nodered.org/t/subflows-inputs-and-outputs/49072/6 "2021-09-27T18:04:25Z")

</div>

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