# Subflow multiple inputs support

**URL:** https://discourse.nodered.org/t/subflow-multiple-inputs-support/90805
**Category:** General
**Created:** [9 September 2024 06:53 UTC](https://discourse.nodered.org/t/subflow-multiple-inputs-support/90805 "2024-09-09T06:53:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![wenbei](https://avatars.discourse-cdn.com/v4/letter/w/ac91a4/32.png) [@wenbei](https://discourse.nodered.org/u/wenbei)
#### Post date: [9 September 2024 06:53 UTC](https://discourse.nodered.org/t/subflow-multiple-inputs-support/90805/1 "2024-09-09T06:53:34Z")

</div>

I has viewed the forum [why-dont-node-red-nodes-allow-multiple-inputs](https://discourse.nodered.org/t/why-dont-node-red-nodes-allow-multiple-inputs/10973).  
And I have some different perspectives about multiple inputs in subflow node.  
In an example like the one below,multiple inputs will be more convenient.

 ![20240909-144956](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/9/b9a630d92b7ddeba0547e4c18a0dfb9e2419fdfa.jpeg)

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [9 September 2024 07:03 UTC](https://discourse.nodered.org/t/subflow-multiple-inputs-support/90805/2 "2024-09-09T07:03:17Z")

</div>

Messages are passed 1 by 1 and you will have to capture the input in order to deal with the messages.  
The 'do something same' function handles them 1 by 1, never together, thus, having an additional input does not help.

Use a switch node to route the message and a join node to combine multiple messages and then process it. Or use context to store/read to combine multiple (more complex)

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [9 September 2024 07:08 UTC](https://discourse.nodered.org/t/subflow-multiple-inputs-support/90805/3 "2024-09-09T07:08:38Z")

</div>

Welcome to the forums @wenbei

This topic has been brought up so many times.

It doesn't matter where multiple input support is added - the mechanics behind it, are just to great, and will require a complete overhaul of message handling throughout the core of Node RED.

The `topic` property, along with a `switch` as @bakman2 mentions is what you need to use.

---

<div class="post-metadata">

### Author: ![wenbei](https://avatars.discourse-cdn.com/v4/letter/w/ac91a4/32.png) [@wenbei](https://discourse.nodered.org/u/wenbei)
#### Post date: [9 September 2024 07:59 UTC](https://discourse.nodered.org/t/subflow-multiple-inputs-support/90805/4 "2024-09-09T07:59:35Z")

</div>

Got it.Thanks for your reply！

---

<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: [23 September 2024 08:00 UTC](https://discourse.nodered.org/t/subflow-multiple-inputs-support/90805/5 "2024-09-23T08:00:36Z")

</div>

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