# Any Node-red expert in support?

**URL:** <https://community.gladysassistant.com/t/un-expert-node-red-dans-lassistance/7764>\
**Category:** Configuration\
**Created:** [December 12, 2022, 7:03pm UTC](https://community.gladysassistant.com/t/un-expert-node-red-dans-lassistance/7764 "2022-12-12T19:03:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [December 12, 2022, 7:03pm UTC](https://community.gladysassistant.com/t/un-expert-node-red-dans-lassistance/7764/1 "2022-12-12T19:03:56Z")

</div>

Hi everyone 🙂

This weekend I achieved what is an accomplishment for me: using Node-RED so that Telegram sends me a message with a photo when my outdoor camera detects a human.  
A small step for some… haha

Anyway it works, but I’d like to be able to use this camera/photo via Telegram when an intrusion is detected in the house.

My problem: in Node-RED I don’t know how to go about making a trigger coming from Gladys start a series of actions.

My cascade of actions would look like this:

- When my MQTT fake device «&nbsp;intrusion&nbsp;» in Gladys switches to active
- Then I tell Node-RED
- Node-RED should send me the photos from my cameras at time T

But I don’t know how to translate this starting condition in Node-RED, there’s no If / else / then

Any ideas?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [December 12, 2022, 8:40pm UTC](https://community.gladysassistant.com/t/un-expert-node-red-dans-lassistance/7764/2 "2022-12-12T20:40:20Z")

</div>

Hi,

Quickly you can use a switch with your fake MQTT device as the input

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/a/a611348f47f15b16158c482d9bb9278008c93f75.png)

If your device equals 0 then you select the first output from the top

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/c/c71acb02b8a7f0fbd0277fde842c2513ff30009e.png)

If your device equals 1 then you select the first output from the bottom

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/f/f3b26330de099ae6226846b099bb0d1a8de881b8.png)

So if your active state corresponds to the value 1 then you can connect your Telegram function after it

Here is the switch detail

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/7/74ba6a09efa2f949ff0ca1093d1827666288ea3e.png)

Otherwise you can also use a function and do a bit of JavaScript  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/a/ac202bd8ff24d64b0e5e56c19329c3db43f6940c.png)

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [December 12, 2022, 9:57pm UTC](https://community.gladysassistant.com/t/un-expert-node-red-dans-lassistance/7764/3 "2022-12-12T21:57:32Z")

</div>

That’s great! Thank you so much!! 😁

---

<div class="post-metadata">

**Author:** ![Tlse-vins](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/tlse-vins/32/6054_2.png) [@Tlse-vins](https://community.gladysassistant.com/u/Tlse-vins)\
**Post date:** [December 12, 2022, 10:01pm UTC](https://community.gladysassistant.com/t/un-expert-node-red-dans-lassistance/7764/4 "2022-12-12T22:01:31Z")

</div>

Hi, it would be great if you could make a tutorial for that @guim31.  
I’ll write one as soon as I can for Node-RED and Sonos speakers.

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [December 12, 2022, 10:22pm UTC](https://community.gladysassistant.com/t/un-expert-node-red-dans-lassistance/7764/5 "2022-12-12T22:22:22Z")

</div>

As soon as my flows are a bit «&nbsp;cleaner&nbsp;» I’ll make a tutorial 👍
