# Delayed push message in flow

**URL:** <https://community.homey.app/t/delayed-push-message-in-flow/118788>\
**Category:** Questions & Help\
**Tags:** advancedflow\
**Created:** [October 22, 2024, 1:43pm UTC](https://community.homey.app/t/delayed-push-message-in-flow/118788 "2024-10-22T13:43:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Agamemnond](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/agamemnond/32/117170_2.png) [@Agamemnond](https://community.homey.app/u/Agamemnond)\
**Post date:** [October 22, 2024, 1:43pm UTC](https://community.homey.app/t/delayed-push-message-in-flow/118788/1 "2024-10-22T13:43:08Z")

</div>

Hi,

I try to create an advanced flow that results in a push message. Since I don’t want any messages being sent to me during the night I want to delay the push until a specified time if the flow runs at night time.

I would be grateful for help.

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [October 22, 2024, 5:07pm UTC](https://community.homey.app/t/delayed-push-message-in-flow/118788/2 "2024-10-22T17:07:32Z")

</div>

Some thoughts:

- Store the message text in a variable. Use the [Chronograph app](https://homey.app/nl-nl/app/nl.fellownet.chronograph/Chronograph/) to initiate a timer for the duration between now and the time you want the message to be send. Create a seperate flow that is triggered when the timer ends and sends the push notification based on the text in the variable; Or,
- Store the message text in variable. Create an additional Yes/No-variable that indicates whether the message has been sent. When the event occurs and it is a time window in which messages may be send, then directly send the notification and set the Yes/No variable to Yes. Otherwise (time window is not ok), save the message text in the message variable and set the Yes/No flag to No. Next create a separate flow that periodically checks whether you have reached the appropriate time window for sending messages and the Yes/No flag is set to No. Then create a push notification based on the message variable and set the Yes/No variable to Yes.

Note that you need to ensure that the message variable is not changes by other flows when it is input for a pending notification to be send.

---

<div class="post-metadata">

**Author:** ![Patrick\_Van\_Deursen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/patrick_van_deursen/32/56539_2.png) [@Patrick\_Van\_Deursen](https://community.homey.app/u/Patrick_Van_Deursen)\
**Post date:** [October 22, 2024, 6:37pm UTC](https://community.homey.app/t/delayed-push-message-in-flow/118788/3 "2024-10-22T18:37:00Z")

</div>

or in stead of chrono, you can use timey:

> **[Timey](https://homey.app/nl-nl/app/no.kjeet90.timey/Timey/)**
>
> Make your time flows dynamic with variables

and use a flexible or preset time

---

<div class="post-metadata">

**Author:** ![Agamemnond](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/agamemnond/32/117170_2.png) [@Agamemnond](https://community.homey.app/u/Agamemnond)\
**Post date:** [October 23, 2024, 10:13am UTC](https://community.homey.app/t/delayed-push-message-in-flow/118788/4 "2024-10-23T10:13:54Z")

</div>

Isn’t there anyway to set a exact time for an event to happened?

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [October 23, 2024, 10:23am UTC](https://community.homey.app/t/delayed-push-message-in-flow/118788/5 "2024-10-23T10:23:15Z")

</div>

```auto
WHEN time is 08:00
AND var_message is TRUE
THEN sendmessage var_message_text
     set var_message to FALSE

```

---

<div class="post-metadata">

**Author:** ![Agamemnond](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/agamemnond/32/117170_2.png) [@Agamemnond](https://community.homey.app/u/Agamemnond)\
**Post date:** [October 23, 2024, 11:48am UTC](https://community.homey.app/t/delayed-push-message-in-flow/118788/6 "2024-10-23T11:48:00Z")

</div>

Tanks, I’m sure that’s a way to do it but I’m not familiar with scripts so I don’t understand it completely.  
Is there a way to do it in advanced flow?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 23, 2024, 1:02pm UTC](https://community.homey.app/t/delayed-push-message-in-flow/118788/7 "2024-10-23T13:02:48Z")

</div>

When you don’t want to receive push messages @ night, they’re not critical I suppose.  
For those messages I use the Simple Log app.  
Just a suggestion.

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [October 23, 2024, 4:47pm UTC](https://community.homey.app/t/delayed-push-message-in-flow/118788/8 "2024-10-23T16:47:12Z")

</div>

It is not a script but just a description of logic which can be easy realized in a standard flow in a similar way using WHEN, AND and THEN cards.  
var\_message is a Boolean variable which is set to true when a message shall be send, var\_messagetext is a text variable which contains the text to be send.  
Both variables shall be set in a flow when something (you did not describe) happens.  
Just look up the corresponding cards in advanced flows. Standard flows and advanced flows are just a different presentation of the same logic flow.

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [October 23, 2024, 6:45pm UTC](https://community.homey.app/t/delayed-push-message-in-flow/118788/9 "2024-10-23T18:45:35Z")

</div>

Just as an illustrative example (sorry for the Dutch elements, so I added some notes):

 ![Message Sent Flag Example](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/c/8c827aee875eed158bfed952fbd455dca1777402.png)
