# How to remember a state from one flow to another?

**URL:** <https://discourse.nodered.org/t/how-to-remember-a-state-from-one-flow-to-another/78819>\
**Category:** General\
**Tags:** node-red-dashboard\
**Created:** [30 May 2023 15:47 UTC](https://discourse.nodered.org/t/how-to-remember-a-state-from-one-flow-to-another/78819 "2023-05-30T15:47:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndKe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andke/32/73023_2.png) [@AndKe](https://discourse.nodered.org/u/AndKe)\
**Post date:** [30 May 2023 15:47 UTC](https://discourse.nodered.org/t/how-to-remember-a-state-from-one-flow-to-another/78819/1 "2023-05-30T15:47:42Z")

</div>

in one flow, I receive the status of garage doors like:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c1fc0e1b8a216c6fff4122027f78a416582bbe8a.png)

Then , in another flow, I recieve a telegram command:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/a/8a71890c33e65cca23836e33010d4968756cd23d.png)

how can I respond to that telegram command based on the last state of the door?  
Do I store the lat door state in some variable? - and read it in this one? - I see no global variables anywhere.

---

<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:** [30 May 2023 16:01 UTC](https://discourse.nodered.org/t/how-to-remember-a-state-from-one-flow-to-another/78819/2 "2023-05-30T16:01:32Z")

</div>

Repeat the MQTT In node in the telegram flow then use a Join node to combine the telegram and MQTT messages.

See [this article in the cookbook](https://cookbook.nodered.org/basic/join-streams) for an example of how to join messages into one object.

---

<div class="post-metadata">

**Author:** ![AndKe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andke/32/73023_2.png) [@AndKe](https://discourse.nodered.org/u/AndKe)\
**Post date:** [30 May 2023 16:12 UTC](https://discourse.nodered.org/t/how-to-remember-a-state-from-one-flow-to-another/78819/3 "2023-05-30T16:12:41Z")

</div>

Thank you!

---

<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:** [13 June 2023 16:13 UTC](https://discourse.nodered.org/t/how-to-remember-a-state-from-one-flow-to-another/78819/4 "2023-06-13T16:13:25Z")

</div>

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