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.
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
ClickRuntime starts each time your voice or chat agent calls your trigger link.
If the agent asks for free times, it checks your Google Calendar and returns the open slots.
If the agent asks to book, it creates the appointment in your calendar with the caller's details.
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
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 Google Drive steps into one automation
Under the hood
The code that runs this automation
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?
How does it avoid double bookings?
What if the FAQ does not cover a question?
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
Create a Drive folder and book a kickoff call for each new client
Each new client gets their own Drive folder copied from your template and a kickoff meeting booked next week.
See how it worksTurn meeting transcripts into action items and follow-ups
When a meeting transcript lands in Drive, the action items are pulled out for you and any follow-up meetings are put in your calendar.
See how it worksPrepare a lesson plan for each of tomorrow's classes
Each evening, every class in tomorrow's calendar gets a lesson plan document in Drive, linked from the calendar event.
See how it worksKeep exploring
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.