Skip to content

The moment it happens

Book appointments only when you're free

Booking requests are accepted only for free slots within your hours, and land on your calendar with the attendee.

Runs
The moment it happens
Apps
Google Calendar
AI
Not needed
Access
read+write (calendar.events, calendar.freebusy)

Send this to your assistant

Create a ClickRuntime automation: give me a booking link. For each request, check my Google Calendar for that slot between 9am and 5pm on weekdays, and create a 30-minute appointment with the attendee if I'm free. Otherwise reply that the slot is taken.

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

A massage therapist takes bookings through a web form, and twice last month two clients ended up with the same Thursday 3 pm slot. One was turned away awkwardly by text. Requests also arrive for 9 pm and Sunday morning, outside her working hours, and she has to reply to each one manually. Every manual check is a chance to double book or to answer too late.

When someone submits the booking form, it calls a ClickRuntime trigger link with the requested time and the person's details. ClickRuntime checks Google Calendar's free and busy information, rejects slots outside business hours or already taken, and otherwise creates the event with the attendee. The result is returned to the form or sent by email.

Consultants, tutors and clinics use it as a simple alternative to a full scheduling tool.

What you get out of it

  • Double bookings stop happening

    The calendar is checked before an event is created, so a taken slot is declined at the moment of request. No more apologetic texts to a client who thought they were confirmed.

  • Out-of-hours requests are declined politely

    Requests for midnight or Sunday morning are rejected by rule, with no manual reply needed. You keep your boundaries, and the client gets an immediate answer instead of waiting for you.

  • Instant confirmation for clients

    People get a yes or no right away, with the event invitation in their inbox. Fast confirmation reduces drop-off, because a visitor deciding whether to book is unlikely to wait a day.

  • Everything lands on one calendar

    Accepted bookings are real events on the calendar you already use. No second system to check and no copying details from a form into the calendar by hand. Your calendar reminders and your phone notifications work exactly as before.

  • Cheaper than a full booking platform

    For a small practice with simple rules, a form and a check does the job. You avoid a monthly subscription for features you do not need while still protecting your time.

How it works

What happens, step by step

  1. When someone asks for a time slot through your booking form or voice agent, ClickRuntime receives the request.

  2. It turns down requests outside weekday business hours.

  3. It checks your Google Calendar to make sure you are free for that half hour.

  4. If you are, it books the event and sends the person an invite. Either way, they get a clear reply straight away.

Before it runs live

  • Connect Google Calendar
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Book appointments only when you're freejust nowSucceeded
Booking replyBooked for Wed 22 Oct 14:30. An invite is on its way to jamie@northwind.example.

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 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.
book_appointments_with_an_availability_check.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timedelta
from zoneinfo import ZoneInfo
from clickruntime import on_event, credentials

TZ = ZoneInfo("Europe/London")

@on_event
def handle(event):
    req = event.json or {}
    start = datetime.fromisoformat(req["start"]).astimezone(TZ)
    end = start + timedelta(minutes=30)
    if start.weekday() >= 5 or start.hour < 9 or end > start.replace(hour=17, minute=0):
        return {"booked": False, "message": "Please pick a weekday slot between 9am and 5pm."}
    cal = build("calendar", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    busy = cal.freebusy().query(body={"timeMin": start.isoformat(), "timeMax": end.isoformat(),
                                      "items": [{"id": "primary"}]}).execute()["calendars"]["primary"]["busy"]
    if busy:
        return {"booked": False, "message": "That slot is taken, please choose another."}
    cal.events().insert(calendarId="primary", sendUpdates="all", body={
        "summary": f"Appointment with {req['name']}",
        "start": {"dateTime": start.isoformat()}, "end": {"dateTime": end.isoformat()},
        "attendees": [{"email": req["email"]}],
    }).execute()
    return {"booked": True, "message": f"Booked for {start:%a %d %b %H:%M}."}

FAQ

Common questions

How does it know I am busy at a given time?
It queries free and busy information for the calendar, so any existing event that marks you as busy blocks the slot. Events you have set to show as free do not block bookings, which is useful for reminders and all-day notes.
Can I set different working hours for different days?
Yes. The rule can define hours per weekday, such as 9 to 5 Monday to Thursday and 9 to noon Friday, with weekends closed. Holidays and days off can also be handled by blocking them on the calendar, since busy time is respected.
What does the client see if the slot is taken?
The response says the time is unavailable, and it can suggest the next free slots. Whether this appears on the form or in an email depends on how the trigger is wired. A short, polite message works best to keep them booking.
What permissions does it need?
read+write (calendar.events, calendar.freebusy). 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 for each event the app sends.
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 “Book appointments only when you're free” from your assistant

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