The moment it happens
Check booking requests against your calendar and book the good fits
When someone asks for an appointment, it is checked against your criteria and your calendar, booked if it fits, and the person gets a confirmation or a polite decline.
- Runs
- The moment it happens
- Apps
- Gmail, Google Calendar
- AI
- Yes, uses the built-in AI allowance
- Access
- Calendar read+write (calendar.events); Gmail gmail.send
Send this to your assistant
Create a ClickRuntime automation: when my booking form sends a request, decide whether it's a good fit, check my Google Calendar for that slot, create the event and email the person a confirmation or a polite decline.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A business coach offers free 30-minute intro calls. Half the requests are from students, other coaches or people outside her area, and each one costs her a back-and-forth by email before she can say yes or no.
Screening each request against your criteria and your calendar the moment it arrives gives good-fit clients an instant booking and everyone else a courteous answer, without you sorting them by hand.
What you get out of it
Good clients are booked straight away
A suitable request with a free slot becomes a calendar event and a confirmation email within a minute, while the person is still interested.
Poor fits get a kind answer
People who are not a match receive a polite decline rather than silence or a booked call that goes nowhere.
No double bookings
The slot is checked against your calendar before anything is created.
You stay informed
You get an email for every request with the decision and the reason, so you can override it if needed.
How it works
What happens, step by step
When someone submits your booking form, the request is sent to ClickRuntime.
AI compares the request with your description of a good-fit client.
For a good fit, ClickRuntime checks your Google Calendar to make sure the requested time is free.
If it is, the event is added to your calendar with the person invited and they get a confirmation email. Otherwise they get a polite decline, and you get a note either way.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- Connect Google Calendar
- 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 Gmail and Google Calendar steps into one automation
Under the hood
The code that runs this automation
import base64
from datetime import datetime, timedelta
from email.message import EmailMessage
from clickruntime import on_event, credentials, http, ai, notify
IDEAL = "Owners of service businesses with at least 5 staff, based in the UK."
CAL = "https://www.googleapis.com/calendar/v3"
def send(h, to, subject, text):
m = EmailMessage(); m["To"] = to; m["Subject"] = subject; m.set_content(text)
http.post("https://gmail.googleapis.com/gmail/v1/users/me/messages/send", headers=h, json={"raw": base64.urlsafe_b64encode(m.as_bytes()).decode()})
@on_event
def handle(event):
p = event.json or {}
h = {"Authorization": f"Bearer {credentials.connection('google', 'work')}"}
fit = ai.generate(f"Ideal client: {IDEAL}\nRequest: {p.get('message', '')[:2000]}\nAnswer yes or no.", max_output_tokens=5).text.lower().startswith("yes")
start = datetime.fromisoformat(p["start"])
end = start + timedelta(minutes=30)
busy = http.post(f"{CAL}/freeBusy", headers=h, json={"timeMin": start.isoformat(), "timeMax": end.isoformat(),
"items": [{"id": "primary"}]}).json()["calendars"]["primary"]["busy"]
if fit and not busy:
http.post(f"{CAL}/calendars/primary/events", headers=h, params={"sendUpdates": "all"}, json={"summary": f"Intro call: {p['name']}",
"start": {"dateTime": start.isoformat()}, "end": {"dateTime": end.isoformat()}, "attendees": [{"email": p["email"]}]})
send(h, p["email"], "Your call is booked", f"Hi {p['name']}, you're booked for {start:%A %d %B at %H:%M}. A calendar invite is on its way.")
else:
send(h, p["email"], "About your call request", f"Hi {p['name']}, thank you for getting in touch. I'm not able to take this call, but I wish you the best.")
notify.email_me(f"Booking request from {p['name']}", f"Fit: {fit}. Slot free: {not busy}.")
return {"booked": fit and not busy}FAQ
Common questions
How does it decide who is a good fit?
What if the requested time is taken?
Which form tools work?
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
Add event sign-ups to the calendar invite
Everyone who registers through your form is added to the event in Google Calendar and gets a confirmation email.
See how it worksBook interviews automatically when you shortlist a candidate
When you shortlist a candidate, the next free 45-minute slot is booked on your calendar with a Meet link and the candidate gets an invitation email.
See how it worksGet a research brief before every external meeting
An hour before any meeting with people outside your company, you get an email about who they are, recent news and what you last discussed.
See how it worksKeep exploring
Set up “Check booking requests against your calendar and book the good fits” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.