Infinite reminders - Nurse bot

(Louis Springer) #1

Hi, im building a bot to remind users to take his drugs.

How made a user get his remind every day in same time?

How use broadcast feature for this need?

Or “Wait Until a Date” feature for this need?

The users have different drugs and drugs administration times.

Any ideia?

1 Like
(Daniel Beckett) #2

Hi Louis,

You could do this using two flows. A general overview would be:

Flow 1

  1. Bot > Send a Message
  2. Wait for a While (1 or 2 mins)
  3. Flow > Trigger a Flow (Flow 2)

Flow 2

  1. Wait until a date (desired time, e.g. 11:00am)
  2. Flow > Trigger a Flow (Flow 1)

1 Like
(Anish Duggal) #3

Hi @DanielBeckett,

Is there a way to access the users timezone or current time?

(Daniel Beckett) #4

The default timezone is determined by whatever your profile is set to so unfortunately, no. You could use the UTC timezone and ask the user what timezone they are based in and offset any wait tasks based on the time zone difference. Granted, I can see this not exactly being ideal since you’re relying on the user to provide an accurate UTC offset for their time zone.

Just throwing ideas out there but I could see something like Bot > Ask a Question > “Which country/timezone are you from?” that can be queried against a list in Google Sheets that has a list of time zones and their UTC offsets in, e.g. this list from Wikipedia.

(Louis Springer) #5

Hi, Daniel

When the user trigger the flow 1 he can continue using the bot normally by trigger others flow? The routines “wait fo a while” and “Wait until a date” will run as a background routine?

(Daniel Beckett) #6

@louisaas

The user can still trigger other flows while there’s a wait until date task in the background. :slight_smile:

(I Magiс) #7

Ok, it works perfectly if you have some certain number of reminders (1, 2 or 3 different reminders). But what if you want to create bot for unlimited number of reminders? There was shown a way to create a new flow for an every new reminder. Can we use the same flow for different reminders? I guess yes (“triger flow” can create a lot of flow clons), but we must have the tool to stop any old reminder (or edit it). Maybe we can stop the all of reminders by “Clear open questions” or use “stop rest of flow” in filters, but how to stop exactly one specific reminder (or rewrite it)? Is it possible? Or we have to stop the all reminders if we want to get rid at least one of them? And what is the best way to stop the all reminders?