Daily WhatsApp reminders for tomorrow's appointments

By General Input

Every evening at 6pm, message tomorrow's customers on WhatsApp with their appointment time and location, so fewer of them forget to show up.

Integrations

  • Kapso
  • Google Calendar

Type

Deterministic Code

Categories

  • Operations
  • Customer Support

Every day at 6pm, send WhatsApp reminders for tomorrow's appointments so we stop losing money to no-shows. Run this on a daily cron at 6pm in our business timezone.

Start by fetching tomorrow's appointments from Google Calendar with the List Events operation, pointed at our bookings calendar. Set the time window to cover all of tomorrow, from midnight to 11:59pm in our local timezone, and page through the results so a busy day never gets truncated. Skip anything that is cancelled, and skip all-day entries, which are usually holiday or availability blocks rather than real bookings.

For each remaining event, pull the customer's WhatsApp number out of the event description or the location field. Booking tools write the number into either place and the formatting is inconsistent, so match tolerantly: allow spaces, dashes, parentheses, and a leading plus or country code, then normalize whatever you find into E.164 format. If an event has no number that parses into a plausible phone number, skip that event and carry on with the rest. One unparseable event must never fail the whole run. Take the customer name from the event title, falling back to the first guest's name if the title does not carry it.

For every appointment that has a usable number, send the reminder with Kapso's Send a Message operation, passing the normalized number in the `to` field. This has to be an approved WhatsApp message template rather than free-form text. Kapso's own docs are explicit that "Sending a template to a number outside an open 24-hour customer service window requires an approved message template", and a reminder going out the day before an appointment is almost always outside that window. Fill the template variables with the customer name, the appointment start time formatted in our local timezone, and the location.

Send at most one reminder per event. Before sending, check whether we have already logged a reminder for that calendar event id, and skip the event if we have. After each successful send, record the event id so that a manual rerun later the same evening never messages anyone twice.

Finish the run with a short log line summarizing how many events were found, how many reminders were sent, how many were skipped for a missing or unparseable number, and how many were skipped because a reminder had already gone out.

Related prompts

Explore more prompts
Front desk appointment confirmation board for the next 3 daysShared WhatsApp inbox with a 24 hour reply window countdownWhatsApp broadcast console for planning and launching campaignsAppointment confirmation board built on WhatsApp repliesPlan a field sales day around drive time and neglected accountsShort-term rental turnover console for Home AssistantRun your HoneyBook booking season from one calendarA keep in touch board built on your Google ContactsSee who actually joined your recurring Google Meet callsSee which of your recurring meetings are one person talking