I’ve setup a calendar in my app with individual events list for every user and now I want the users to receive an email reminder for every upcoming event in their calendar 1-3-5 days prior the event. I feel that it can be done via workflows, but I’ve just started working with Glide and struggling with this task. Any tips here would be very helpful
Just some heads up, if you’re planning to run scheduled workflows, make sure your time calculations can fit with the timezone UTC+0.
I recall server-side workflows like scheduled workflows refer to UTC+0 as their “now” time, and as your case is related to that “1-3-5 days prior to the event”, you might want to pivot your “now” to UTC+0 to make sure it runs smoothly.
Hey @MaximeBaker , thanks a lot, this looks pretty close to what I’m looking for, though it covers a bit different case and it seems that I’m not smart enough to apply it to my problem
Probably you might come up with some more tips if I provide some details. What I’m making is an app for pregnant women or those who has just given birth to their child. I have a table with events providing dates of various tests and examinations that need to be done while pregnancy period and after child birth. Those dates are computed based on dates of conception and date of child birth (so they are individual for every user) and user provides those dates in user profile settings.
I want my app to check daily if there is any upcoming event in the calendar and send an email notificattion 5 days before the event and on the day of the event.
I was trying to play around with a workflow to check a particular column that would calculate days till event and send an email if value matches 5 and 0, but for some reason it just wouldn’t let me create a column with such formula.
You are trying to subtract a date from a number, and that won’t work. That’s why you get the error. For your Date replacement, you should be using an actual Date, not the result of a math column (which I assume is a number). This will give you the number of days between the supplied Date and Today (Now).
Thank you so much @ThinhDinh , this Date Difference helped
As for the dates/numbers issue - I tried using two columns for the formula - both Math type, but the values inside were dates - still it wouldn’t let me work with it.
But, since you helped me find the solution, it doesn’t matter much
Guys, I just figured out, that when trying to setup a workflow, I can only use data from one data tab, while I need the workflow to check “days till” in one (Events) tab and then send a notification to a user email that is in the other tab (Users).
Any ideas how this can be done? I checked on Youtube and it seems that it can somehow be solved via Relation function, but Relation is supposed to find matching values in different tabs, while I don’t have/need matching values (or am I missing something here?).
If you are grabbing values from different tables. How is the workflow supposed to know which row to look at in those other tables. What would be the deciding factor that tells it exactly which piece of information you need?
@ThinhDinh thank you for this tip, but the logic behind the event list in my calendar is slightly different and it looks that the scenario that you offered wouldn’t work there. To make it very basic: in my app each user can provide their date of child conception and date of child birth. I also have a list of important doctor visits and different blood tests which looks like:
Test A is to happen 5 days after child conception
Visit A is to happen in 10 dayes after child conception
Test B is to happen 15 days after child conception
Test C is to happen 35 days after child conception
etc (overall about 40 dates based either on date of child conception or on the date of child birth).
So for every particular user these dates will be unique and I’m trying to make a workflow where the app will check the column “days till” for each user (i guess on daily basis) and if it equals 3 days, then send an email reminder about this event.
Then try triggering it on the Users’ side instead.
In the events table, have number for “Days After”, the “Event Name” and all info related to the Email.
daysAfter
eventName
emailSubject
emailBody
5
Test A
Reminder: Test A
Hi {{userName}}, this is a reminder that Test A is scheduled for today ({{eventDate}}). Please prepare any required documents.
10
Visit A
Reminder: Visit A
Hi {{userName}}, Visit A is scheduled for today ({{eventDate}}). Don’t forget to bring your ID and insurance details.
15
Test B
Reminder: Test B
Hi {{userName}}, Test B is today ({{eventDate}}). Please follow pre-test instructions as advised.
35
Test C
Reminder: Test C
Hi {{userName}}, Test C is scheduled for today ({{eventDate}}). Please confirm your appointment time.
Then, in the Users table, you should have a column to calculate the number of days that have passed after child conception. Round that down to the integer.
Do a relation using that to the daysAfter column above. Retrieve the emailSubject and emailBody.
Run a scheduled workflow on Users, find all rows where the relation above is not empty (meaning there’s something to send today!), then use a template module to replace the {{userName}} and {{eventDate}} variables, and send the email.