Skip to content

The moment it happens

Book appointment requests into your calendar and a sheet

Booking requests are checked against your calendar, booked when you are free and logged in your appointments sheet.

Runs
The moment it happens
Apps
Google Calendar, Google Sheets
AI
Not needed
Access
Calendar read+write; Sheet edit

Send this to your assistant

Create a ClickRuntime automation: when a booking request hits my trigger link, check if I'm free, book it in Google Calendar and add it to my Appointments sheet.

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 physiotherapist takes bookings through a simple form on her website. Each request arrives by email and she checks her calendar between patients, replies, and then adds the slot to a sheet she uses for billing. Requests sent on a Friday evening wait until Monday.

Checking availability and booking straight away gives clients an answer at once and keeps the calendar and the billing sheet in step.

What you get out of it

  • Bookings confirmed at any hour

    Requests sent in the evening or at weekends are booked straight away, so clients do not drift to another practice while waiting.

  • No double bookings

    Each request is checked against your calendar before it is booked, so two clients never get the same slot.

  • Billing sheet always matches the diary

    Every booking and reschedule is written to the sheet, so invoicing uses the same record as the calendar.

  • Reschedules handled the same way

    When a client moves an appointment, the event and the sheet row are both updated, with no manual edits.

How it works

What happens, step by step

  1. When a client books on your website, the request is sent to your ClickRuntime trigger link.

  2. ClickRuntime checks your Google Calendar to see whether you are free at that time.

  3. If you are free, it creates the appointment and invites the client; if it is a reschedule, it moves the existing appointment.

  4. The booking is added to your Appointments sheet, or the existing row is updated.

Before it runs live

  • Connect Google Calendar
  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Book appointment requests into your calendar and a sheetjust nowSucceeded
Google Sheets · AppointmentsTue 10 Jun 09:00, Casey Morgan, casey@acme.example, booked

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 Google Sheets 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_and_reschedule_appointments_logged_in_sheets.pyexample
from googleapiclient.discovery import build
from google.oauth2.credentials import Credentials
from clickruntime import on_event, credentials

SHEET_ID = "your-spreadsheet-id"

@on_event
def handle(event):
    b = event.json
    creds = Credentials(credentials.connection("google", "work"))
    cal = build("calendar", "v3", credentials=creds, cache_discovery=False)
    busy = cal.freebusy().query(body={"timeMin": b["start"], "timeMax": b["end"], "items": [{"id": "primary"}]}).execute()
    if busy["calendars"]["primary"]["busy"]:
        return {"booked": False, "reason": "busy"}
    body = {"summary": f"Appointment: {b['name']}", "start": {"dateTime": b["start"]}, "end": {"dateTime": b["end"]},
            "attendees": [{"email": b["email"]}]}
    if b.get("event_id"):
        ev = cal.events().patch(calendarId="primary", eventId=b["event_id"], body=body, sendUpdates="all").execute()
    else:
        ev = cal.events().insert(calendarId="primary", body=body, sendUpdates="all").execute()
    build("sheets", "v4", credentials=creds, cache_discovery=False).spreadsheets().values().append(
        spreadsheetId=SHEET_ID, range="Appointments!A:E", valueInputOption="USER_ENTERED",
        body={"values": [[b["start"], b["name"], b["email"], ev["id"], "rescheduled" if b.get("event_id") else "booked"]]}).execute()
    return {"booked": True, "event": ev["id"]}

FAQ

Common questions

What happens if I'm busy at the requested time?
The request is not booked and the response tells your form the slot is taken, so the client can choose another time.
Can I set working hours?
Yes. Requests outside the hours and days you set are refused, even if your calendar is empty then.
Does the client get a calendar invite?
Yes, if their email is in the request. They are added as a guest and receive the invite and any later changes.
What permissions does it need?
Calendar read+write; Sheet edit. 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 appointment requests into your calendar and a sheet” from your assistant

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