# Collecting values for multiple variables before processing?

**URL:** <https://discourse.nodered.org/t/collecting-values-for-multiple-variables-before-processing/20570>\
**Category:** General\
**Created:** [19 January 2020 11:56 UTC](https://discourse.nodered.org/t/collecting-values-for-multiple-variables-before-processing/20570 "2020-01-19T11:56:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![klauskinski](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@klauskinski](https://discourse.nodered.org/u/klauskinski)\
**Post date:** [19 January 2020 11:56 UTC](https://discourse.nodered.org/t/collecting-values-for-multiple-variables-before-processing/20570/1 "2020-01-19T11:56:53Z")

</div>

Folks, I'm new to Node Red, but I did play around a bit. It seems that the Node Red processes individual messages and creates responses. i.e. there is a direct relationship between the input and output as 1-to-1...

I receive messages via MQTT. My process would need to receive values for multiple variables from several MQTT messages over a period of ~10-15 minutes before processing and sending the output out as a JSON.

Is this possible?

Thanks,  
Klaus

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [19 January 2020 11:59 UTC](https://discourse.nodered.org/t/collecting-values-for-multiple-variables-before-processing/20570/2 "2020-01-19T11:59:28Z")

</div>

Take a look at this recipe in the cookbook:

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

Also described in this video: [https://youtu.be/t8T-JMnQHMk](https://youtu.be/t8T-JMnQHMk)

---

<div class="post-metadata">

**Author:** ![klauskinski](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@klauskinski](https://discourse.nodered.org/u/klauskinski)\
**Post date:** [19 January 2020 12:22 UTC](https://discourse.nodered.org/t/collecting-values-for-multiple-variables-before-processing/20570/3 "2020-01-19T12:22:08Z")

</div>

Thanks! Looking at it now....

---

<div class="post-metadata">

**Author:** ![klauskinski](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@klauskinski](https://discourse.nodered.org/u/klauskinski)\
**Post date:** [19 January 2020 15:11 UTC](https://discourse.nodered.org/t/collecting-values-for-multiple-variables-before-processing/20570/4 "2020-01-19T15:11:23Z")

</div>

Thanks for helping, it's already working 🙃
