# Only send a message if I press a button

**URL:** <https://discourse.nodered.org/t/only-send-a-message-if-i-press-a-button/46355>\
**Category:** General\
**Created:** [27 May 2021 15:57 UTC](https://discourse.nodered.org/t/only-send-a-message-if-i-press-a-button/46355 "2021-05-27T15:57:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [27 May 2021 16:01 UTC](https://discourse.nodered.org/t/only-send-a-message-if-i-press-a-button/46355/2 "2021-05-27T16:01:41Z")

</div>

Use a change node to store the value in a flow or context variable.

Then when the button is pressed, grab the value you stored early.

See the docs (read up on context)

---

_[View the full topic](https://discourse.nodered.org/t/only-send-a-message-if-i-press-a-button/46355)._
