Skip to content

The moment it happens

Let your voice or chat agent book appointments and answer from Drive

Your AI phone or chat agent can check your free times, book appointments in Google Calendar and answer questions from your FAQ document in Drive.

Runs
The moment it happens
Apps
Google Calendar, Google Drive
AI
Yes, uses the built-in AI allowance
Access
calendar read+write; drive.readonly

Send this to your assistant

Create a ClickRuntime automation: give my voice agent a link it can call to check free slots in my Google Calendar and book appointments, and another way to answer questions from my Drive FAQ doc.

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 dental clinic uses an AI phone agent to answer calls after hours. It can greet callers and take messages, but it cannot see the clinic's diary or answer questions about opening hours and fees, so most calls still end with 'someone will call you back'.

This automation gives the agent a trigger link it can call to see free times in your Google Calendar, book an appointment, and answer questions from your FAQ document in Drive. Callers get a booking and an answer in the same call.

What you get out of it

  • Bookings made on the first call

    Callers who reach the agent outside opening hours can book there and then, instead of waiting for a callback that may come too late.

  • Answers from your own document

    Questions about prices, parking or preparation are answered from the FAQ you keep in Drive, so the agent says what you would say.

  • Your calendar stays the diary

    Appointments land directly in Google Calendar alongside everything else, with no separate booking system to keep in sync.

  • Update the FAQ, update the agent

    Edit the Drive document and the next caller gets the new answer. There is nothing to retrain or re-upload.

How it works

What happens, step by step

  1. ClickRuntime starts each time your voice or chat agent calls your trigger link.

  2. If the agent asks for free times, it checks your Google Calendar and returns the open slots.

  3. If the agent asks to book, it creates the appointment in your calendar with the caller's details.

  4. If the agent asks a question, AI answers it using only your FAQ document in Drive.

Before it runs live

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

What you get

RunsThe moment it happens
Let your voice or chat agent book appointments and answer from Drivejust nowSucceeded
Voice agent · BookingBooked: Appointment for Sam Rivera, Thu 23 Oct 16:30 at Northwind Dental.

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
  • 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 Google Drive 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.
booking_endpoint_for_voice_chat_agents_with_drive_knowledge.pyexample
from datetime import datetime, timedelta
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, ai

FAQ_DOC_ID = "your-faq-doc-id"

@on_event
def handle(event):
    req = event.json or {}
    creds = Credentials(credentials.connection("google", "work"))
    cal = build("calendar", "v3", credentials=creds, cache_discovery=False)
    if req.get("action") in ("slots", "book"):
        start = datetime.fromisoformat(req["start"])
        end = start + timedelta(minutes=int(req.get("minutes", 30)))
        busy = cal.freebusy().query(body={"timeMin": start.isoformat(), "timeMax": end.isoformat(),
                                          "items": [{"id": "primary"}]}).execute()["calendars"]["primary"]["busy"]
        if req["action"] == "slots" or busy:
            return {"free": not busy}
        ev = cal.events().insert(calendarId="primary", body={"summary": f"Appointment: {req.get('name')}",
             "description": f"Phone: {req.get('phone', '')}", "start": {"dateTime": start.isoformat()},
             "end": {"dateTime": end.isoformat()}}).execute()
        return {"booked": True, "event_id": ev["id"]}
    drive = build("drive", "v3", credentials=creds, cache_discovery=False)
    faq = drive.files().export(fileId=FAQ_DOC_ID, mimeType="text/plain").execute().decode()[:15000]
    answer = ai.generate(f"FAQ:\n{faq}\n\nQuestion: {req.get('question')}", max_output_tokens=200,
                         system="Answer only from the FAQ. If it has no answer, reply exactly: NO_ANSWER").text
    return {"answer": answer}

FAQ

Common questions

Which agents can use it?
Any voice or chat agent platform that can call a web link as a tool or function, which most of them can.
How does it avoid double bookings?
It checks your calendar for free time right before booking, and refuses a slot that has just been taken.
What if the FAQ does not cover a question?
The agent is told the document has no answer, so it can offer to take a message instead of guessing.
What permissions does it need?
calendar read+write; drive.readonly. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly 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 “Let your voice or chat agent book appointments and answer from Drive” from your assistant

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