Back to blog
Chatmaid Developers··9 min read

Build a WhatsApp Appointment Reminder System in Python

Build WhatsApp appointment reminders in Python: an instant confirmation, reminders 48, 24 and 2 hours ahead, CONFIRM or CANCEL replies, and a follow-up.

Chatmaid Team
Build a WhatsApp Appointment Reminder System in Python

A WhatsApp appointment reminder system has four parts: a webhook from your booking tool, a queue that knows when each message is due, a sender, and a handler for replies. This guide builds all four in Python with Flask, Celery, Redis and the Chatmaid Developers API, which sends from your own WhatsApp number. Every booking gets an instant confirmation, reminders 48 hours, 24 hours and 2 hours before, a one-word CONFIRM, RESCHEDULE or CANCEL reply flow, and a follow-up afterwards. The examples use Calendly. Part 5 covers Cal.com, Acuity, Google Calendar and your own database.

A slot that nobody shows up for, and nobody else can fill, is lost revenue. A reminder gives people a chance to remember, and gives those who can't come an easy way to cancel while there is still time to rebook the slot.

If you'd rather not write code, you can schedule individual reminders by hand in Chatmaid Schedule.

System overview

The system is six small files:

  1. Booking intake (bookings.py): receives Calendly webhooks, saves the appointment and queues its messages.
  2. Reminder queue (store.py): a Redis sorted set ordered by send time, plus the appointment records.
  3. Sender (tasks.py and chatmaid_client.py): a Celery beat task checks the queue every minute, renders each message and sends it with POST /v1/messages/send.
  4. Reply handler (replies.py): receives message.received webhooks and acts on CONFIRM, RESCHEDULE or CANCEL.

app.py ties the two webhook endpoints into one Flask app.

When to send each reminder

A sequence that works for most service businesses:

WhenMessagePurpose
Right after bookingBooking confirmationConfirm the details and share reschedule and cancel links
48 hours beforeFirst reminderEarly nudge with a reschedule link
24 hours beforeConfirmation requestAsk for a CONFIRM, RESCHEDULE or CANCEL reply
2 hours beforeFinal reminderShort same-day nudge
2 hours after the endFollow-upAsk for a review and invite a rebooking

You don't need all five. If you build one, build the 24-hour reminder. A 2026 study of 475,214 outpatient appointments in Buenos Aires' public health system found that a single WhatsApp reminder about 24 hours ahead cut no-shows by about a quarter compared with no reminder, and adding a second reminder at 72 hours did not improve on it. It is a preprint, so treat the numbers as early evidence. To drop a step, delete its line from SCHEDULE in store.py.

For wording ideas beyond the templates below, see 50 WhatsApp reminder message templates.

Setup: keys, environment and shared helpers

You need Python 3.11 or later, a Redis server, a Chatmaid Developers account and an API key with the messages:send scope. Keys that start with sk_test_ simulate every send. They only see numbers you add in the dashboard's Test Mode, which connect without a QR scan and are free, so you can build the whole outbound flow without messaging anyone. Going live takes three things: an active subscription, your number added in Live mode and linked by scanning the QR code, and an sk_live_ key. The API looks up CHATMAID_FROM_PHONE only among numbers in the key's environment.

pip install flask celery redis requests

export REDIS_URL="redis://localhost:6379/0"
export CHATMAID_API_KEY="sk_test_your_key"
export CHATMAID_FROM_PHONE="+15551234567"        # the sender number for this key's environment
export CHATMAID_WEBHOOK_SECRET="your_webhook_secret"
export CALENDLY_TOKEN="your_calendly_personal_access_token"
export CALENDLY_SIGNING_KEY="a_long_random_string"
export STAFF_PHONE="+15557654321"                # who hears about confirmations and cancellations
export BUSINESS_TIMEZONE="America/New_York"
export BOOKING_URL="https://calendly.com/your-business"
export REVIEW_URL="https://example.com/leave-a-review"

chatmaid_client.py holds everything that talks to the API. If you're new to calling it from Flask, sending WhatsApp notifications with Python and Flask covers the basics.

import hashlib
import hmac
import os
import re

import requests

SEND_URL = "https://developers-api.chatmaid.net/v1/messages/send"


def to_e164(raw: str | None) -> str | None:
    """Turn '+1 404-555-0123' into '+14045550123'. None if there is no country code."""
    if not raw or not raw.strip().startswith("+"):
        return None
    digits = re.sub(r"\D", "", raw)
    if digits.startswith("0") or not 7 <= len(digits) <= 15:
        return None
    return "+" + digits


def make_key(kind: str, ref: str) -> str:
    """A stable idempotency key that fits the API's 64-character limit."""
    return f"{kind}:{hashlib.sha256(ref.encode()).hexdigest()[:40]}"


def send_whatsapp(to: str, content: str, idempotency_key: str) -> dict:
    """Send one WhatsApp message from your connected number."""
    response = requests.post(
        SEND_URL,
        headers={"Authorization": f"Bearer {os.environ['CHATMAID_API_KEY']}"},
        json={
            "fromPhoneId": os.environ["CHATMAID_FROM_PHONE"],
            "to": to,
            "content": content,
            "idempotencyKey": idempotency_key,
        },
        timeout=15,
    )
    response.raise_for_status()
    return response.json()["data"]


def verify_signature(raw_body: bytes, header: str | None, secret: str) -> bool:
    """Check a 't=<timestamp>,v1=<hex HMAC-SHA256>' signature header."""
    try:
        parts = dict(item.split("=", 1) for item in (header or "").split(","))
        signed = parts["t"].encode() + b"." + raw_body
    except (KeyError, ValueError):
        return False
    expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
    return hmac.compare_digest(parts.get("v1", ""), expected)

Three details matter here:

  • Phone format. The API accepts individual phone numbers in E.164 format only (+ and digits). to_e164 strips spaces and dashes and refuses numbers without a country code, because guessing one sends reminders to the wrong person.
  • Idempotency. When the API sees an idempotencyKey it has seen before, it returns the original message instead of sending a new one. Every send in this system uses a key built from the appointment and the message type, so retries and redelivered webhooks can't message a client twice. Keys are limited to 64 characters, which is why make_key hashes the ID.
  • Signatures. Chatmaid and Calendly sign webhooks the same way: a header of the form t=<timestamp>,v1=<signature>, where the signature is an HMAC-SHA256 of the timestamp, a dot and the raw body. One function checks both. Retries can arrive minutes after the first attempt, so it doesn't reject old timestamps; the handlers are safe to run twice instead.

store.py keeps appointments and the reminder queue in Redis:

import json
import os
import time
from datetime import datetime

import redis

r = redis.Redis.from_url(os.environ["REDIS_URL"], decode_responses=True)

QUEUE = "reminders:queue"  # sorted set of "<appointment id>|<kind>", scored by send time

# When each message goes out, relative to the appointment's start or end.
SCHEDULE = {
    "reminder_48h": ("start", -48 * 3600),
    "reminder_24h": ("start", -24 * 3600),
    "reminder_2h": ("start", -2 * 3600),
    "followup": ("end", 2 * 3600),
}


def ts(iso: str) -> float:
    return datetime.fromisoformat(iso).timestamp()


def seconds_until(moment: float) -> int:
    return max(60, int(moment - time.time()))


def save_appointment(appt: dict) -> None:
    keep_until = ts(appt["end"]) + 3 * 86400
    r.set(f"appointment:{appt['id']}", json.dumps(appt), ex=seconds_until(keep_until))


def get_appointment(appointment_id: str) -> dict | None:
    data = r.get(f"appointment:{appointment_id}")
    return json.loads(data) if data else None


def queue_reminders(appt: dict) -> None:
    now = time.time()
    for kind, (anchor, offset) in SCHEDULE.items():
        send_at = ts(appt[anchor]) + offset
        if send_at > now:  # booked at short notice: skip reminders already in the past
            r.zadd(QUEUE, {f"{appt['id']}|{kind}": send_at})


def due(now: float) -> list[tuple[str, float]]:
    return r.zrangebyscore(QUEUE, "-inf", now, withscores=True)


def claim(member: str) -> bool:
    # ZREM removes an entry for exactly one caller, so each reminder is sent once.
    return r.zrem(QUEUE, member) == 1


def unqueue(appointment_id: str, kinds=tuple(SCHEDULE)) -> None:
    r.zrem(QUEUE, *(f"{appointment_id}|{kind}" for kind in kinds))


def reply_key(phone: str) -> str:
    # WhatsApp can report a number differently from how it was booked
    # (an extra 9 after +54, a 1 after +52, no 9 on some Brazilian mobiles),
    # so match replies on the last 8 digits.
    return "pending:" + phone[-8:]


def await_reply(appt: dict) -> None:
    """Remember that this number owes us a CONFIRM, RESCHEDULE or CANCEL."""
    r.set(reply_key(appt["phone"]), appt["id"], ex=seconds_until(ts(appt["start"])))


def pending_for(phone: str) -> dict | None:
    appointment_id = r.get(reply_key(phone))
    return get_appointment(appointment_id) if appointment_id else None


def clear_pending(phone: str) -> None:
    r.delete(reply_key(phone))


def cancel_appointment(appointment_id: str) -> None:
    appt = get_appointment(appointment_id)
    unqueue(appointment_id)
    r.delete(f"appointment:{appointment_id}")
    if appt and r.get(reply_key(appt["phone"])) == appointment_id:
        clear_pending(appt["phone"])

Part 1: Booking confirmation from a Calendly webhook

When someone books, Calendly sends an invitee.created webhook. bookings.py checks the signature, turns the payload into an appointment record, queues its reminders and sends the confirmation straight away. When a booking is cancelled, Calendly sends invitee.canceled and the queued messages are dropped.

import os

from flask import Blueprint, jsonify, request

import store
from chatmaid_client import to_e164, verify_signature
from tasks import send_message

bookings = Blueprint("bookings", __name__)


def register_booking(appointment: dict) -> None:
    """Save a booking, queue its reminders and send the confirmation now."""
    store.save_appointment(appointment)
    store.queue_reminders(appointment)
    send_message.delay(appointment["id"], "confirm")


def describe_location(location: dict | None) -> str:
    # In-person and phone locations carry "location"; video calls carry "join_url".
    location = location or {}
    return location.get("location") or location.get("join_url") or ""


def find_phone(invitee: dict) -> str | None:
    for qa in invitee.get("questions_and_answers") or []:
        if "whatsapp" in qa.get("question", "").lower():
            return to_e164(qa.get("answer"))
    return to_e164(invitee.get("text_reminder_number"))


@bookings.post("/webhooks/calendly")
def calendly_webhook():
    if not verify_signature(
        request.get_data(),
        request.headers.get("Calendly-Webhook-Signature"),
        os.environ["CALENDLY_SIGNING_KEY"],
    ):
        return jsonify(error="invalid signature"), 401

    body = request.get_json()
    invitee = body["payload"]

    if body["event"] == "invitee.created":
        phone = find_phone(invitee)
        if phone is None:
            return jsonify(skipped="no phone number with a country code"), 200
        event = invitee["scheduled_event"]
        register_booking({
            "id": invitee["uri"],
            "event_uri": event["uri"],
            "phone": phone,
            "name": invitee.get("first_name") or invitee["name"],
            "service": event["name"],
            "start": event["start_time"],
            "end": event["end_time"],
            "location": describe_location(event.get("location")),
            "timezone": invitee.get("timezone") or os.environ["BUSINESS_TIMEZONE"],
            "reschedule_url": invitee["reschedule_url"],
            "cancel_url": invitee["cancel_url"],
        })

    elif body["event"] == "invitee.canceled":
        # A Calendly reschedule arrives as a cancel of the old booking
        # followed by a new invitee.created, so this covers both.
        store.cancel_appointment(invitee["uri"])

    return jsonify(received=True), 200

Add a required phone-number question to your Calendly event, such as "WhatsApp number (with country code)". find_phone reads that answer from questions_and_answers. It falls back to text_reminder_number, which Calendly fills only when the event type offers text reminders and the invitee opts in. Bookings that have neither are skipped.

Calendly sends times in UTC. The handler stores the invitee's time zone (or yours, as a fallback) so every message shows the local time the client expects.

Part 2: Scheduled reminders with Celery beat

tasks.py holds the message templates and two tasks. A beat task runs every minute, takes every reminder that is due off the queue, and hands each one to send_message.

import os
import time
from datetime import datetime
from zoneinfo import ZoneInfo

import requests
from celery import Celery

import store
from chatmaid_client import make_key, send_whatsapp

BOOKING_URL = os.environ["BOOKING_URL"]
REVIEW_URL = os.environ["REVIEW_URL"]
MAX_LATE = 30 * 60  # skip reminders more than 30 minutes overdue (e.g. after an outage)

celery = Celery("tasks", broker=os.environ["REDIS_URL"], include=["replies"])
celery.conf.beat_schedule = {
    "send-due-reminders": {"task": "tasks.send_due_reminders", "schedule": 60.0},
}

TEMPLATES = {
    "confirm": (
        "Hi {name}, your appointment is booked.\n\n"
        "{service}\n{when}\n{location}\n\n"
        "Need to change it?\n"
        "Reschedule: {reschedule_url}\n"
        "Cancel: {cancel_url}"
    ),
    "reminder_48h": (
        "Hi {name}, a reminder that your appointment is in 2 days.\n\n"
        "{service}\n{when}\n{location}\n\n"
        "Can't make it? Pick another time: {reschedule_url}"
    ),
    "reminder_24h": (
        "Hi {name}, your appointment is tomorrow.\n\n"
        "{service}\n{when}\n{location}\n\n"
        "Please reply with one word:\n"
        "*CONFIRM* if you'll be there\n"
        "*RESCHEDULE* if you need another time\n"
        "*CANCEL* if you can't make it"
    ),
    "reminder_2h": "See you soon, {name}. {service} starts at {clock}.\n{location}",
    "followup": (
        "Hi {name}, thanks for coming in today. If you have a minute, "
        "a short review helps others find us: {review_url}\n\n"
        "Book your next visit: {booking_url}"
    ),
}


def local_start(appt: dict) -> datetime:
    return datetime.fromisoformat(appt["start"]).astimezone(ZoneInfo(appt["timezone"]))


def format_when(appt: dict) -> str:
    start = local_start(appt)
    clock = start.strftime("%I:%M %p").lstrip("0")
    return f"{start:%A, %B} {start.day} at {clock}"


def render(kind: str, appt: dict) -> str:
    return TEMPLATES[kind].format(
        name=appt["name"],
        service=appt["service"],
        location=appt["location"],
        when=format_when(appt),
        clock=local_start(appt).strftime("%I:%M %p").lstrip("0"),
        reschedule_url=appt["reschedule_url"],
        cancel_url=appt["cancel_url"],
        review_url=REVIEW_URL,
        booking_url=BOOKING_URL,
    )


@celery.task
def send_due_reminders():
    """Runs every minute and hands each due reminder to a worker exactly once."""
    now = time.time()
    for member, send_at in store.due(now):
        if not store.claim(member):
            continue  # another process took it
        if now - send_at > MAX_LATE:
            continue  # a 2-hour reminder that arrives after the visit does more harm than good
        appointment_id, kind = member.rsplit("|", 1)
        send_message.delay(appointment_id, kind)


@celery.task(autoretry_for=(requests.ConnectionError, requests.Timeout),
             retry_backoff=True, max_retries=5)
def send_message(appointment_id: str, kind: str):
    appt = store.get_appointment(appointment_id)
    if appt is None:
        return  # cancelled since it was queued
    if kind == "reminder_24h":
        store.await_reply(appt)
    # Same appointment + same kind = same key, so a retry never sends twice.
    send_whatsapp(appt["phone"], render(kind, appt), make_key(kind, appointment_id))

Why a sorted set and not Celery's eta= option? With a Redis broker, Celery's documentation warns that a task scheduled further ahead than the visibility timeout (one hour by default) is redelivered and run again, in a loop. A 48-hour reminder would hit that every time. The sorted set has no such limit, survives worker restarts, and makes cancelling a reminder a single ZREM.

Only network errors are retried. When the API rejects a send, it answers with an error status, and a retry with the same key gets the same answer. raise_for_status() turns that into a failed task in Celery's logs, which is where to hook an alert.

Part 3: Handling CONFIRM, RESCHEDULE and CANCEL replies

When the 24-hour reminder goes out, send_message records that the client's number owes a reply. The message.received webhook tells you when the reply arrives. If webhooks are new to you, our guide to receiving WhatsApp messages by webhook walks through the setup.

In the Chatmaid dashboard, point your webhook at https://your-server.example/webhooks/chatmaid (it must be HTTPS) and subscribe to message.received. When you save, the dashboard shows the signing secret, so copy it into CHATMAID_WEBHOOK_SECRET right away. The handler goes in replies.py:

import os
import re

import requests
from flask import Blueprint, jsonify, request

import store
from chatmaid_client import make_key, send_whatsapp, verify_signature
from tasks import BOOKING_URL, celery, format_when

replies = Blueprint("replies", __name__)

# Only the words the 24-hour reminder asks for, plus Spanish equivalents.
# A bare "No" or "3" could be the answer to some other question.
CONFIRM = {"CONFIRM", "YES", "SI", "SÍ"}
RESCHEDULE = {"RESCHEDULE", "CHANGE", "CAMBIAR"}
CANCEL = {"CANCEL", "CANCELAR"}


@replies.post("/webhooks/chatmaid")
def chatmaid_webhook():
    if not verify_signature(
        request.get_data(),
        request.headers.get("X-Chatmaid-Signature"),
        os.environ["CHATMAID_WEBHOOK_SECRET"],
    ):
        return jsonify(error="invalid signature"), 401

    event = request.get_json()
    if event["event"] == "message.received" and not event["data"].get("isGroup"):
        handle_reply.delay(event["data"])
    return jsonify(received=True), 200


@celery.task(autoretry_for=(requests.ConnectionError, requests.Timeout),
             retry_backoff=True, max_retries=3)
def handle_reply(message: dict):
    phone = message["from"]
    appt = store.pending_for(phone)
    if appt is None:
        return  # Not a reminder reply: it is in WhatsApp on your phone like any chat.

    word = re.sub(r"\W", "", message.get("content") or "").upper()
    ref = message["messageId"]  # a redelivered webhook carries the same ID
    summary = f"{appt['name']}, {appt['service']}, {format_when(appt)}"

    def reply(text: str) -> None:
        send_whatsapp(phone, text, make_key("reply", ref))

    def tell_staff(text: str) -> None:
        send_whatsapp(os.environ["STAFF_PHONE"], text, make_key("staff", ref))

    # CONFIRM and RESCHEDULE send first, then clear the pending flag: if a send
    # fails and the task retries, the flag is still there and the idempotency
    # keys stop repeats.
    if word in CONFIRM:
        reply("Thank you, you're confirmed. See you then.")
        tell_staff(f"Confirmed: {summary}")
        store.clear_pending(phone)
    elif word in RESCHEDULE:
        reply(f"No problem. Pick a new time here: {appt['reschedule_url']}")
        store.clear_pending(phone)
    elif word in CANCEL:
        # Cancelling clears the stored appointment (and Calendly's invitee.canceled
        # webhook would clear it anyway), so the two notices get their own task.
        cancel_in_calendly(appt["event_uri"])
        store.cancel_appointment(appt["id"])
        send_cancel_notices.delay(phone, summary, ref)
    # Anything else ("running 10 minutes late") is for a person to answer.


@celery.task(autoretry_for=(requests.ConnectionError, requests.Timeout),
             retry_backoff=True, max_retries=5)
def send_cancel_notices(phone: str, summary: str, ref: str):
    send_whatsapp(phone, f"Your appointment is cancelled. You can book again any time: {BOOKING_URL}",
                  make_key("reply", ref))
    send_whatsapp(os.environ["STAFF_PHONE"], f"Cancelled, the slot is free: {summary}",
                  make_key("staff", ref))


def cancel_in_calendly(event_uri: str) -> None:
    # This cancels the whole scheduled event, so use it for one-on-one bookings.
    response = requests.post(
        f"{event_uri}/cancellation",
        headers={"Authorization": f"Bearer {os.environ['CALENDLY_TOKEN']}"},
        json={"reason": "Cancelled by the client on WhatsApp"},
        timeout=15,
    )
    response.raise_for_status()

How it behaves:

  • The webhook answers fast. The endpoint checks the signature, queues the work and returns 200. Chatmaid retries failed deliveries, so slow or failing handlers lead to repeats.
  • Matching is forgiving, but narrow. "Confirm.", "confirm" and "Sí" all count, because the handler strips punctuation and ignores case before comparing. Only the words the reminder asks for (and their Spanish equivalents) do anything, so a "No" sent in another conversation never cancels a booking.
  • Free text goes to a person. Because the API sends from your own WhatsApp number, every reply also shows up in WhatsApp on your phone. Messages that aren't a keyword, and messages from people with no pending reminder, are left for your team to answer there.
  • Cancellations free the slot. A CANCEL reply cancels the event through Calendly's API, drops the remaining reminders and queues the notices to the client and to staff as a separate task, so a network error on either send is retried even though the appointment record is gone. Calendly then sends invitee.canceled, which finds nothing left to remove.
  • Group messages are ignored. Reminders are one-to-one, so the handler skips anything with isGroup set.

One limit of this design: pending replies are matched on the last 8 digits of the number, so a client with two appointments on consecutive days answers for the later reminder.

app.py puts both webhook endpoints in one Flask app:

from flask import Flask

from bookings import bookings
from replies import replies

app = Flask(__name__)
app.register_blueprint(bookings)
app.register_blueprint(replies)

To run everything, start the web app and a worker with beat:

flask --app app run --port 8000
celery -A tasks worker --beat --loglevel=info

Running beat inside the worker is fine for development. In production, run celery -A tasks beat as its own process next to one or more workers, as Celery's documentation recommends. Both webhook URLs must be reachable over HTTPS, so put the Flask app behind a proxy or a tunnel while you test.

Inbound messages only exist on live connections. The sk_test_ sandbox simulates sends but never receives replies, so test Part 3 with a live key and a second phone to reply from.

Part 4: Post-appointment follow-up

The follow-up is already part of the schedule: store.py queues it 2 hours after the appointment ends, and the followup template asks for a review and links to your booking page. Set REVIEW_URL to wherever you collect reviews.

Don't ask for a review from someone who didn't turn up. When a client misses an appointment, remove their follow-up:

"""Usage: python no_show.py <appointment id>, for example the Calendly invitee URI."""
import sys

import store

store.unqueue(sys.argv[1], ["followup"])
print("Follow-up cancelled for", sys.argv[1])

If you mark no-shows in Calendly, you could also subscribe to its invitee_no_show.created event and call store.unqueue from a webhook instead.

Part 5: Connecting other booking tools

Everything after intake stays the same. Each booking tool only needs to produce the appointment dictionary that register_booking() expects and to call store.cancel_appointment() when a booking is cancelled.

Calendly

Calendly webhooks need a paid Calendly plan, and you create the subscription through Calendly's API. Create the personal access token with the users:read, webhooks:write, scheduled_events:read and scheduled_events:write scopes: tokens created without scopes get no API access, and without scheduled_events:write a CANCEL reply cannot cancel the booking. Your organization's URI is the current_organization field returned by GET https://api.calendly.com/users/me. The signing_key you choose here is what goes in CALENDLY_SIGNING_KEY.

curl -X POST https://api.calendly.com/webhook_subscriptions \
  -H "Authorization: Bearer $CALENDLY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-server.example/webhooks/calendly",
    "events": ["invitee.created", "invitee.canceled"],
    "organization": "https://api.calendly.com/organizations/YOUR_ORGANIZATION_ID",
    "scope": "organization",
    "signing_key": "a_long_random_string"
  }'

Cal.com

In Cal.com, add a webhook under Settings, Developer, Webhooks and pick the BOOKING_CREATED, BOOKING_RESCHEDULED and BOOKING_CANCELLED triggers (Cal.com webhook docs). Cal.com signs requests with an x-cal-signature-256 header, an HMAC-SHA256 of the body without a timestamp, so give it its own small check instead of verify_signature.

Acuity Scheduling

Through Acuity's API you subscribe to appointment.scheduled, appointment.rescheduled and appointment.canceled. A URL entered under Integrations gets the same notifications, with an action field of scheduled, rescheduled or canceled (Acuity webhook docs). Either way the notification is form-encoded and carries only the appointment ID, so fetch the appointment from Acuity's API to get the client's phone number and time.

Google Calendar

Google Calendar push notifications only say that something changed. They carry no event data, so your handler has to fetch the changed events. Calendar attendees also have an email address but no phone number field, so look the number up in your own customer records.

Your own database

If bookings live in your own system, call register_booking() from bookings.py when one is created and store.cancel_appointment() when one is cancelled. For the CANCEL reply, replace cancel_in_calendly() with a call that cancels the booking in your system.

Measuring the impact on no-shows

Count no-shows for four weeks before and after you switch reminders on, and count replies by type in handle_reply (one Redis INCR per keyword is enough). How clinics reduce no-shows with WhatsApp reminders covers what to compare.

The Chatmaid side costs $7.99 a month, flat, and the sandbox you build against is free. See Chatmaid Developers for current plans.

Frequently asked questions

Can I test this without sending real WhatsApp messages?

Yes, for the outbound side. Keys that start with sk_test_ simulate every send, and the sandbox is free. Inbound messages only exist on live connections, so testing the CONFIRM and CANCEL replies needs an sk_live_ key and a second phone.

Do I need the WhatsApp Business API or Meta verification?

No. Chatmaid Developers sends from your own WhatsApp number, linked by scanning a QR code in the dashboard, with no Meta Business verification. See using a WhatsApp API without Meta Business verification.

What happens if a client's phone number has no country code?

The API only accepts phone numbers in E.164 format, such as +14045550123. to_e164 skips numbers that don't start with a country code rather than guessing one. Ask for the number with its country code on your booking form.

Can a reminder be sent twice?

Not through retries. Every send carries an idempotencyKey made from the appointment and the message type, and the API returns the original message when it sees a key again. Celery retries, redelivered webhooks and two beat processes running at once all end in a single message.

Can I build this in Node.js instead?

Yes. The API is plain HTTPS, so the same design works in any language. The official JavaScript SDK, @chatmaid/sdk, wraps the send call as messages.send() and takes the same fromPhoneId, to, content and idempotencyKey fields. The messages docs cover the full request.

Could reminders get my number banned?

It is very unlikely with normal use. WhatsApp restricts accounts that behave like spam, such as sending unsolicited bulk messages to people who don't have your number saved. Appointment reminders go to people who booked with you and gave you their number. Keep them short and leave marketing out of them.