Hi everyone,
I’m encountering an issue with the “Only When” conditions I’ve set up in my Bubble workflow for sending scheduled WhatsApp reminders. The goal is to send reminders 2 days before, 1 day before, and on the day of a “Visita” (appointment).
Currently, my “Only When” conditions for the three WhatsApp steps look like this:
- Step 1 (2 days before):
Only when Visita's Giorno + Ora rounded down to day - Current date/formatted as days is 2
- Step 2 (1 day before):
Only when Visita's Giorno + Ora rounded down to day - Current date/formatted as days is 1
- Step 3 (on the day):
Only when Visita's Giorno + Ora rounded down to day - Current date/formatted as days is 0
The problem I’ve identified is that this logic seems to only compare the day of the month and doesn’t take into account the month or the year.
For example:
- If the “Visita’s Giorno” is November 9th and the “Current date” is October 9th, Step 3’s condition (
is 0
) would be true, and the reminder intended for the day of the visit would be sent a month early. - Similarly, if the “Visita’s Giorno” is in a future month, the reminders for 2 days and 1 day before would only trigger if the day of the current month gets close to the day of the “Visita’s Giorno”, ignoring the month difference.
My question is: How can I correctly calculate the difference in total days between the “Visita’s Giorno” and the “Current date” in the “Only When” conditions?
Here the pic: