# Subflow with buttons?

**URL:** https://discourse.nodered.org/t/subflow-with-buttons/94573
**Category:** Feature Requests
**Created:** [13 January 2025 11:51 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573 "2025-01-13T11:51:42Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)
#### Post date: [13 January 2025 11:51 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573/1 "2025-01-13T11:51:42Z")

</div>

How awesome would it be if subflow could have buttons like inject/debug? Is this something that could be done in a future release? 🤩

---

<div class="post-metadata">

### Author: ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)
#### Post date: [13 January 2025 12:07 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573/2 "2025-01-13T12:07:09Z")

</div>

I seem to recall that the reason this hasn't been implemented yet is aesthetic - if there's a button there can't be an input.

I remain in favor of the idea but it must be remembered that an injection button only replaces an `inject` node.

---

<div class="post-metadata">

### Author: ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)
#### Post date: [13 January 2025 12:17 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573/3 "2025-01-13T12:17:25Z")

</div>

Problem with inject node is how misleading it looks. Let's say you want to trigger a message. Now you add inject node into the subflow. The subflow interface now has an input. Which indicates it supports/requires taking input messages. But that's not thecase, because it's only meant to trigger a debug message during development/testing.

However, the cron-plus node does have button (to trigger) and input. So a node certainly can have both?

---

<div class="post-metadata">

### Author: ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)
#### Post date: [13 January 2025 12:20 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573/4 "2025-01-13T12:20:48Z")

</div>

What behavior do you want to achieve with this button (on each subflow instances)?

---

<div class="post-metadata">

### Author: ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)
#### Post date: [13 January 2025 12:28 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573/5 "2025-01-13T12:28:56Z")

</div>

Ideally it would have to be dynamic, so left side could inject empty message. Right side could set a variable true/false. This way I could trigger test messages without changing the interface. To avoid giving impression that the subflow takes/requires input. Further, with a right-button, it could enable/disable debugging inside the subflow, just like normal right-button for debug node does. I'm sure there are thousands of other usecases too.

Take a look at cron-plus node for how combination of input and button is used today.

---

<div class="post-metadata">

### Author: ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)
#### Post date: [13 January 2025 12:34 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573/6 "2025-01-13T12:34:52Z")

</div>

> [@ThingsTinkerer](#):
>
> To avoid giving impression that the subflow takes/requires input.

Putting an inject node directly into the Subflow will have the same effect.

---

<div class="post-metadata">

### Author: ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)
#### Post date: [13 January 2025 15:49 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573/7 "2025-01-13T15:49:32Z")

</div>

How do you trigger that inject node?

---

<div class="post-metadata">

### Author: ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)
#### Post date: [13 January 2025 16:00 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573/8 "2025-01-13T16:00:16Z")

</div>

Right, I forgot this story and I don't remember why this choice.

Sorry, the only Subflows I have are the ones I use to develop the core 😅

---

<div class="post-metadata">

### Author: ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)
#### Post date: [13 January 2025 16:11 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573/9 "2025-01-13T16:11:30Z")

</div>

Ok we use subflows frequently as a sort of multi-node "function". Some require input, others don't (they generate their own input instead).

Of course you COULD trigger a message if you wanted to with inject node, set a timer every minute or once on deploy. But that makes it extra hassle to add, configure, then remember to remove when done. All of which would be solved by a simple button. That so many nodes already have. Like inject (without input). Or cron-plus (also with input).

Having the option of both left-button AND right-button would be even better. Toggle debug or other dev/debug logic inside.

I get that this is not necessary in majority of use cases. Still, it would be super useful in more cases than I can count.

---

<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: [13 April 2025 16:11 UTC](https://discourse.nodered.org/t/subflow-with-buttons/94573/10 "2025-04-13T16:11:43Z")

</div>

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