# A handy subflow which is nearly the trigger node but a bit better

**URL:** https://discourse.nodered.org/t/a-handy-subflow-which-is-nearly-the-trigger-node-but-a-bit-better/97737
**Category:** General
**Created:** [22 June 2025 11:37 UTC](https://discourse.nodered.org/t/a-handy-subflow-which-is-nearly-the-trigger-node-but-a-bit-better/97737 "2025-06-22T11:37:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [22 June 2025 11:37 UTC](https://discourse.nodered.org/t/a-handy-subflow-which-is-nearly-the-trigger-node-but-a-bit-better/97737/1 "2025-06-22T11:37:38Z")

</div>

I have seen _SIMILAR_ nodes to what I've just done, but they miss a certain couple of things.

Like variable time and message to be sent.

All standard nodes used.

```auto
[{"id":"a327532fd783a70f","type":"subflow","name":"Trigger-2","info":"## 2026 06 22\nThis is a timeout node which is nearly\nthe same as the standard trigger node.\nTimes adjustable with incoming message.\n`msg.delay`\n","category":"","in":[{"x":60,"y":70,"wires":[{"id":"196ab91b9f11d7aa"}]}],"out":[{"x":460,"y":70,"wires":[{"id":"a327532fd783a70f","port":0},{"id":"3f5569e5654e9d02","port":0}]}],"env":[{"name":"fail","type":"str","value":"","ui":{"label":{"en-US":"Fail"}}}],"meta":{},"color":"#AAAA66","icon":"node-red/trigger.svg","status":{"x":460,"y":190,"wires":[{"id":"bb267a3080584345","port":0}]}},{"id":"196ab91b9f11d7aa","type":"trigger","z":"a327532fd783a70f","name":"","op1":"","op2":"fail","op1type":"nul","op2type":"str","duration":"4","extend":true,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":155,"y":110,"wires":[["3f5569e5654e9d02"]],"l":false},{"id":"3f5569e5654e9d02","type":"change","z":"a327532fd783a70f","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"fail","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":110,"wires":[[]]},{"id":"bb267a3080584345","type":"status","z":"a327532fd783a70f","name":"","scope":["196ab91b9f11d7aa"],"x":200,"y":190,"wires":[[]]},{"id":"dc0f666775c71452","type":"subflow:a327532fd783a70f","z":"65c9b63cb09879a0","name":"","env":[{"name":"fail","value":"fail","type":"str"}],"x":1040,"y":1190,"wires":[["0215b4912936d24f"]]}]

```

Basic view:

 ![Screenshot from 2025-06-22 21-35-04](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/4/f462fcae514a1938606af3cec4c41a4daa234f23.png)

Basic use:  
As per the `trigger` node but sends a _FAIL_ message if no messages are received determined by `msg.delay`

I am not confident/proficient enough (just now) to set the default time.  
The `status` is there just so you know it is _waiting_.

---

<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: [20 September 2025 11:38 UTC](https://discourse.nodered.org/t/a-handy-subflow-which-is-nearly-the-trigger-node-but-a-bit-better/97737/2 "2025-09-20T11:38:26Z")

</div>

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