# Simple Door Sensor with Email Notification

**URL:** <https://discourse.nodered.org/t/simple-door-sensor-with-email-notification/24539>\
**Category:** General\
**Created:** [9 April 2020 17:18 UTC](https://discourse.nodered.org/t/simple-door-sensor-with-email-notification/24539 "2020-04-09T17:18:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rnormore](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rnormore](https://discourse.nodered.org/u/rnormore)\
**Post date:** [9 April 2020 17:18 UTC](https://discourse.nodered.org/t/simple-door-sensor-with-email-notification/24539/1 "2020-04-09T17:18:53Z")

</div>

Hi Folks

I am a new user to Node Red. I am looking to do a simple project. I have one zwave door sensor which is showing connected in node red and I can see the state change from on and off when opening and closing door.

I would like to get an email alert when the door sensor is on(open). I am able to send and email test in node red and it does come through, but for the life of me I cannot link it all together. Any help would be greatly appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 April 2020 20:11 UTC](https://discourse.nodered.org/t/simple-door-sensor-with-email-notification/24539/2 "2020-04-09T20:11:43Z")

</div>

Start by reading the docs on [working with messages](https://nodered.org/docs/user-guide/messages) which will give you some good information. Then you can feed the message from sensor into a Switch node (not a ui\_switch node) to pass on only messages that indicate it is open, then feed that into a Change node where you can setup the data for the email node. Then, obviously feed that into the email node. Build it by adding one node at a time and feeding the result into a debug node. When that node is doing what it should then add the next one, again feeding it into a debug node, and so on. That stops you getting to the situation where you build a complete flow and it doesn't work but you haven't any idea why.

---

<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:** [8 June 2020 20:11 UTC](https://discourse.nodered.org/t/simple-door-sensor-with-email-notification/24539/3 "2020-06-08T20:11:45Z")

</div>

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