# Node red "Inject Node' as to trigger or send data/value only when the tag is reaches certain value ex: inject node injects only when value reaches \>90, in lessthan \<90 values should not show in debug

**URL:** https://discourse.nodered.org/t/node-red-inject-node-as-to-trigger-or-send-data-value-only-when-the-tag-is-reaches-certain-value-ex-inject-node-injects-only-when-value-reaches-90-in-lessthan-90-values-should-not-show-in-debug/18885
**Category:** General
**Created:** [7 December 2019 17:24 UTC](https://discourse.nodered.org/t/node-red-inject-node-as-to-trigger-or-send-data-value-only-when-the-tag-is-reaches-certain-value-ex-inject-node-injects-only-when-value-reaches-90-in-lessthan-90-values-should-not-show-in-debug/18885 "2019-12-07T17:24:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sandeepanj](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@sandeepanj](https://discourse.nodered.org/u/sandeepanj)
#### Post date: [7 December 2019 17:24 UTC](https://discourse.nodered.org/t/node-red-inject-node-as-to-trigger-or-send-data-value-only-when-the-tag-is-reaches-certain-value-ex-inject-node-injects-only-when-value-reaches-90-in-lessthan-90-values-should-not-show-in-debug/18885/1 "2019-12-07T17:24:11Z")

</div>

## node red "Inject Node' as to trigger or send value/payload only when the tag is reaches certain value ex: inject node should injects only when value reaches \>90, in lessthan \<90 values should not show in debug.

Example like alarm.

Trigger a flow when input tag value \>90 and \<180. please help me .

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [7 December 2019 17:31 UTC](https://discourse.nodered.org/t/node-red-inject-node-as-to-trigger-or-send-data-value-only-when-the-tag-is-reaches-certain-value-ex-inject-node-injects-only-when-value-reaches-90-in-lessthan-90-values-should-not-show-in-debug/18885/2 "2019-12-07T17:31:45Z")

</div>

So what are you actually saying, or asking ???

Can you explain what the 'input tag' is (do you mean the msg.payload) ???

---

<div class="post-metadata">

### Author: ![sandeepanj](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@sandeepanj](https://discourse.nodered.org/u/sandeepanj)
#### Post date: [7 December 2019 17:41 UTC](https://discourse.nodered.org/t/node-red-inject-node-as-to-trigger-or-send-data-value-only-when-the-tag-is-reaches-certain-value-ex-inject-node-injects-only-when-value-reaches-90-in-lessthan-90-values-should-not-show-in-debug/18885/3 "2019-12-07T17:41:06Z")

</div>

I have connected inject node to opcua client node and i am getting data from plc temperature sensor to opcua client node it is fine. my question is that when ever the sensor value reaches max value, i need to send a message to phone through twilio node...? as of now when ever inject node press i am sending message to my mobile. but i required message only when value reaches its maximum value it need to trigger.

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [7 December 2019 17:43 UTC](https://discourse.nodered.org/t/node-red-inject-node-as-to-trigger-or-send-data-value-only-when-the-tag-is-reaches-certain-value-ex-inject-node-injects-only-when-value-reaches-90-in-lessthan-90-values-should-not-show-in-debug/18885/4 "2019-12-07T17:43:08Z")

</div>

Can you share your NR-flow as I'm not familar with 'opcua' ?

Sounds like you need to store the sensor value in a variable and in a function-node check the value against your max value. Just guessing what the flow might look like at this point.

There may be other members on the forum that can help in respect of 'opcua'.

---

<div class="post-metadata">

### Author: ![sandeepanj](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@sandeepanj](https://discourse.nodered.org/u/sandeepanj)
#### Post date: [7 December 2019 17:49 UTC](https://discourse.nodered.org/t/node-red-inject-node-as-to-trigger-or-send-data-value-only-when-the-tag-is-reaches-certain-value-ex-inject-node-injects-only-when-value-reaches-90-in-lessthan-90-values-should-not-show-in-debug/18885/5 "2019-12-07T17:49:33Z")

</div>

This is the node red flow please let me now.  
I need message only when inject value reaches \> 90.

[{"id":"4837e0d8.b2d65","type":"inject","z":"95f368b8.08f1c8","name":"SCHNEIDER-INT","topic":"ns=2;s=SCHNEIDER PLC.Device1.INT;datatype=UInt16","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":140,"wires":[["5a3fcb10.9c1b64"]]}]

---

<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: [7 December 2019 20:08 UTC](https://discourse.nodered.org/t/node-red-inject-node-as-to-trigger-or-send-data-value-only-when-the-tag-is-reaches-certain-value-ex-inject-node-injects-only-when-value-reaches-90-in-lessthan-90-values-should-not-show-in-debug/18885/6 "2019-12-07T20:08:25Z")

</div>

That is not much of a flow. As people will not have the same as equipment as you, we cannot test it.

But I read some misunderstanding about node-red. The inject node is to "inject" values, it is a not a trigger-like node.

You need to look at the [switch node](https://nodered.org/docs/user-guide/nodes#switch) instead.
