Skip to content

Every 10 minutes

Offer cancelled appointments to your waitlist by text

When an appointment is cancelled, everyone on your waitlist is texted the open slot, and the first to reply YES gets booked.

Runs
Every 10 minutes
Apps
Google Calendar, Twilio
AI
Not needed
Access
calendar.events; Twilio send

Send this to your assistant

Create a ClickRuntime automation: every 10 minutes, check my Google Calendar for cancelled appointments; text my waitlist the open slot, book the first person who replies YES, and tell the others it's been filled.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Busy practices have a waitlist of people who'd take an earlier slot, and cancellations every week. Phoning down the list takes time, and by the time someone says yes the slot has often passed.

Texting the whole waitlist the moment a slot opens, and booking whoever answers first, fills cancellations within minutes and keeps the others informed without any phone calls.

What you get out of it

  • Cancelled slots filled

    Openings go to people who want them, often within minutes.

  • Fair to the waitlist

    Everyone hears at the same time and the first reply wins.

  • Booked for you

    The new appointment is added to your calendar automatically.

  • Others kept informed

    People who replied too late are told it's been filled.

How it works

What happens, step by step

  1. Every 10 minutes it checks your Google Calendar for appointments cancelled since the last check.

  2. Everyone on your waitlist gets a text offering the open slot.

  3. The first person to reply YES gets a new calendar event and a confirmation text.

  4. Anyone who replies after that is told the slot has been filled.

Before it runs live

  • Connect Google Calendar
  • Connect Twilio

What you get

RunsEvery 10 minutes
Offer cancelled appointments to your waitlist by texttoday, 9:00Succeeded
SMS · WaitlistA slot opened at Northwind Dental: 2026-10-21 15:00. Reply YES to take it.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Calendar and Twilio steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
fill_cancelled_slots_from_a_waitlist_google_calendar_twilio.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from twilio.rest import Client
from datetime import datetime, timezone
from clickruntime import on_trigger, on_event, credentials, http, state, report_fetched

WAITLIST = {"+447700900111": "Ali", "+447700900222": "Bo"}
FROM = "+15005550006"

def sms(to, body):
    return Client(credentials.secret("TWILIO_ACCOUNT_SID"), credentials.secret("TWILIO_AUTH_TOKEN")).messages.create(to=to, from_=FROM, body=body)
cal = lambda: build("calendar", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).events()

@on_trigger
def run(event):
    now = datetime.now(timezone.utc).isoformat()
    since = state.get("since") or now
    state.set("since", now)
    items = cal().list(calendarId="primary", updatedMin=since, showDeleted=True, singleEvents=True).execute()["items"]
    gone = [e for e in items if e["status"] == "cancelled" and e.get("start", {}).get("dateTime", "") > now]
    report_fetched(len(gone))
    if not gone:
        return {"summary": "No cancellations"}
    state.set("open", {"start": gone[0]["start"], "end": gone[0]["end"]})
    for phone in WAITLIST:
        sms(phone, f"A slot opened: {gone[0]['start']['dateTime'][:16].replace('T', ' ')}. Reply YES to take it.")
    return {"offered": gone[0]["start"]["dateTime"]}

@on_event
def handle(event):
    f, slot = event.json or {}, state.get("open")
    if (f.get("Body") or "").strip().upper() != "YES" or f.get("From") not in WAITLIST:
        return {"skipped": True}
    if slot:
        cal().insert(calendarId="primary", body={"summary": f"Appointment – {WAITLIST[f['From']]}", "description": f["From"], **slot}).execute()
        state.delete("open")
    sms(f["From"], "You're booked! See you then." if slot else "Sorry, that slot has already been filled.")
    return {"booked": bool(slot)}

FAQ

Common questions

Where is the waitlist kept?
In the automation's settings as a list of names and numbers, or at a web address such as a published sheet.
What if nobody replies?
The slot stays open in your calendar, as it would have anyway.
Can it skip slots that are too soon?
Yes. Set a minimum notice, such as two hours.
What permissions does it need?
calendar.events; Twilio send. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Offer cancelled appointments to your waitlist by text” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.