The moment it happens
Text missed callers open times and book them by reply
Missed callers get a text with your next free times, and replying with a number books that slot in your Google Calendar.
- Runs
- The moment it happens
- Apps
- Google Calendar, Twilio
- AI
- Optional
- Access
- Twilio voice/SMS config; calendar.events
Send this to your assistant
Create a ClickRuntime automation: when I miss a call on my Twilio number, text the caller my next three free slots from Google Calendar; when they reply 1, 2 or 3, book that slot and confirm by text.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
For a busy sole trader, missed calls usually mean a job someone wanted to book. Calling back later often means phone tag, and by then the customer may have booked elsewhere.
Texting the caller your next free times straight away, and booking whichever they choose by reply, turns a missed call into a booked appointment without you lifting the phone.
What you get out of it
Missed calls become bookings
Callers can book without waiting for a call back.
Always your real availability
Free times come straight from your Google Calendar.
No phone tag
The booking is done by text in a minute.
Confirmed both ways
The caller gets a confirmation and the event appears in your calendar.
How it works
What happens, step by step
Twilio tells ClickRuntime when a call goes unanswered.
It looks at your Google Calendar for the next three free slots in working hours.
The caller gets a text listing the slots and asking them to reply 1, 2 or 3.
When they reply 1, 2 or 3, that slot is booked in your calendar and confirmed by text.
Before it runs live
- Connect Google Calendar
- Connect Twilio
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
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
- Change what the AI looks for, or how it writes the result
- 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
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from twilio.rest import Client
from datetime import datetime, timedelta, timezone
from clickruntime import on_event, credentials, http, state
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()
def free_slots():
now = datetime.now(timezone.utc).replace(minute=0, second=0, microsecond=0) + timedelta(hours=2)
busy = cal().list(calendarId="primary", timeMin=now.isoformat(), timeMax=(now + timedelta(days=5)).isoformat(), singleEvents=True).execute()["items"]
taken = {e["start"].get("dateTime", "")[:13] for e in busy}
hours = [now + timedelta(hours=h) for h in range(120)]
return [t.isoformat() for t in hours if 9 <= t.hour < 17 and t.weekday() < 5 and t.isoformat()[:13] not in taken][:3]
@on_event
def handle(event):
f = event.json or {}
caller, choice, offer = f.get("From"), (f.get("Body") or "").strip(), state.get(f"offer:{f.get('From')}")
if f.get("CallStatus") in ("no-answer", "busy"):
slots = free_slots()
state.set(f"offer:{caller}", slots)
sms(caller, "Sorry we missed you! Reply with a number to book: " + "; ".join(f"{i + 1}) {s[:16].replace('T', ' ')}" for i, s in enumerate(slots)))
elif offer and choice in ("1", "2", "3")[:len(offer)]:
start = datetime.fromisoformat(offer[int(choice) - 1])
cal().insert(calendarId="primary", body={"summary": f"Call-back booking {caller}", "start": {"dateTime": start.isoformat()},
"end": {"dateTime": (start + timedelta(hours=1)).isoformat()}}).execute()
sms(caller, f"Booked for {start:%a %d %b %H:%M}. See you then!")
state.delete(f"offer:{caller}")
return {"caller": caller}FAQ
Common questions
Which hours are offered?
How long is each slot?
Can a caller book more than once?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Text clients to confirm tomorrow's appointments
Clients with an appointment tomorrow get a text, and their YES or NO reply updates the event in your Google Calendar.
See how it worksGet today's schedule by text each morning
Every weekday morning you get a text listing today's events from your Google Calendar.
See how it worksOffer 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.
See how it worksKeep exploring
Set up “Text missed callers open times and book them by reply” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.