# Send payload with and function

**URL:** <https://discourse.nodered.org/t/send-payload-with-and-function/14111>\
**Category:** General\
**Created:** [7 August 2019 17:34 UTC](https://discourse.nodered.org/t/send-payload-with-and-function/14111 "2019-08-07T17:34:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![niclas.w82](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/niclas.w82/32/31813_2.png) [@niclas.w82](https://discourse.nodered.org/u/niclas.w82)\
**Post date:** [7 August 2019 17:34 UTC](https://discourse.nodered.org/t/send-payload-with-and-function/14111/1 "2019-08-07T17:34:17Z")

</div>

Hi.

Need help with two sensor that I want to trigger a json payload when both of them is open.  
It´s magnetic contacts and I want to send the payload when both of them are open.

have anybody any suggestion how to do this som easy way?

/Niclas

---

<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 August 2019 18:37 UTC](https://discourse.nodered.org/t/send-payload-with-and-function/14111/2 "2019-08-07T18:37:02Z")

</div>

[Try the documentation](https://nodered.org/docs/user-guide/messages).

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [7 August 2019 18:46 UTC](https://discourse.nodered.org/t/send-payload-with-and-function/14111/3 "2019-08-07T18:46:48Z")

</div>

And the [cookbook](https://cookbook.nodered.org/)

---

<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:** [7 August 2019 20:22 UTC](https://discourse.nodered.org/t/send-payload-with-and-function/14111/4 "2019-08-07T20:22:25Z")

</div>

In particular [https://cookbook.nodered.org/basic/join-streams](https://cookbook.nodered.org/basic/join-streams)
