Add item when date(minutes) = current date

Hi all,

I’m trying to setup notifications for users when their event (or an event they’re subscribed to) reaches five minutes before that time, according to current time.

I’m trying to do so with a backend workflow but cannot figure out the logic for the life of me.

Overview: I have a start_date_and_time date value which is set when the event is created. This is stored in data type / table sessions.

I have another data type called Notificaitons which I would like to create a new entry to whenever a start_date_and_time = current time - 5 minutes.

New to bubble - is probably very obvious. Any help appreciated!

Thanks,
Ben

When the event is created, schedule the notification (i.e your notification workflow) - 5 minutes

Hi exception-rambler, thanks for the reply.

Am I right in thinking this would be a new field containing a date, so when notifications are viewed only those whereby the current date >= scheduled date are visible?

No, he means you should schedule a workflow that creates the notification at the exact time that you need it to be created.

So if I want a notification to be created sometime in the future, say 30 minutes from when a user takes an action, then here’s how I’d do it.

  1. Create a backend workflow, within this workflow, the action should be to create a notification. (I’d recommend you look for tutorial on how to create backend workflow and send data from client side)

  2. User clicks a button, run workflow that does xyz, last action in your workflow should be “schedule API workflow” which will be the backend workflow you created above.
    Note: set the schedule date to "current date and time + 30 minutes.

2 Likes

Thank you (both), this makes sense and is now implemented :slight_smile:

This topic was automatically closed after 70 days. New replies are no longer allowed.