Every 10 minutes
Draft replies to meeting requests with your free times
When someone emails asking to meet, a reply proposing three free slots from your calendar is waiting in your drafts.
- Runs
- Every 10 minutes
- Apps
- Gmail, Google Calendar
- AI
- Yes, uses the built-in AI allowance
- Access
- Gmail gmail.modify; Calendar read
Send this to your assistant
Create a ClickRuntime automation: when a new email asks for a meeting, check my calendar for free slots in the next 5 working days and draft a reply proposing three.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A consultant gets several emails a day that end with "when are you free for a call?". Each one means opening the calendar, finding gaps, converting them into a polite list and typing a reply. It takes a few minutes every time, and when she is travelling the replies wait until evening.
A draft reply with three real free slots, written as soon as the request arrives, turns scheduling into a quick read and a click on send. Consultants, founders and salespeople use it to answer meeting requests quickly while keeping full control of what goes out.
What you get out of it
Faster replies to people who want to meet
The draft is ready within minutes, so prospects and partners hear back while they are still keen.
Only times you are actually free
Slots come from your calendar, so you never offer a time that clashes with something already booked.
You stay in control
Replies are saved as drafts, not sent. You can change the times or the wording before sending.
No back and forth with a booking link
Proposing three specific times feels more personal than a link and usually settles the meeting in one reply.
How it works
What happens, step by step
Every few minutes ClickRuntime checks your inbox for new emails.
AI picks out the ones asking to arrange a call or meeting, and skips emails it has already looked at.
It checks your calendar for free times in your working hours over the next 5 working days and picks three.
A polite reply proposing those three times is saved as a draft in the same email thread.
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
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, timezone
from email.mime.text import MIMEText; from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, state, ai, report_fetched
def free_slots(cal, n=3):
now = datetime.now(timezone.utc); busy = cal.freebusy().query(body={"timeMin": now.isoformat(), "timeMax": (now + timedelta(days=7)).isoformat(), "items": [{"id": "primary"}]}).execute()["calendars"]["primary"]["busy"]
slots, day = [], now.replace(minute=0, second=0, microsecond=0) + timedelta(days=1)
while len(slots) < n and day < now + timedelta(days=8):
start = day.replace(hour=9 + 2 * len(slots))
if start.weekday() < 5 and not any(b["start"] < (start + timedelta(minutes=30)).isoformat() and b["end"] > start.isoformat() for b in busy):
slots.append(start.strftime("%A %d %B, %H:%M UTC"))
day += timedelta(days=1)
return slots
@on_trigger
def run(event):
creds = Credentials(credentials.connection("google", "work")); cal = build("calendar", "v3", credentials=creds, cache_discovery=False)
gmail = build("gmail", "v1", credentials=creds, cache_discovery=False).users(); seen = set(state.get("seen") or [])
msgs = [m for m in gmail.messages().list(userId="me", q="in:inbox newer_than:1d -category:promotions").execute().get("messages", []) if m["id"] not in seen]
report_fetched(len(msgs))
if not msgs:
return {"summary": "Nothing new"}
for m in msgs:
msg = gmail.messages().get(userId="me", id=m["id"], format="metadata", metadataHeaders=["From", "Subject"]).execute(); h = {x["name"]: x["value"] for x in msg["payload"]["headers"]}
if ai.generate(f"Is this email asking to schedule a meeting? Answer yes or no.\n{h.get('Subject')}\n{msg['snippet']}", max_output_tokens=5).text.strip().lower().startswith("yes"):
body = "Thanks for reaching out. I could do any of these:\n" + "\n".join(f"- {s}" for s in free_slots(cal)) + "\nLet me know which suits you."
raw = MIMEText(body); raw["To"], raw["Subject"] = h["From"], "Re: " + h.get("Subject", "")
gmail.drafts().create(userId="me", body={"message": {"threadId": msg["threadId"], "raw": base64.urlsafe_b64encode(raw.as_bytes()).decode()}}).execute()
seen.add(m["id"])
state.set("seen", list(seen)[-1000:])
return {"checked": len(msgs)}FAQ
Common questions
Does it send the reply for me?
Which hours does it offer?
How does it decide an email is a meeting request?
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
Get 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 worksCheck 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.
See how it worksBuild a daily timesheet from your calendar and sent email
Each evening you get a timesheet of the day grouped by client, built from your meetings and sent emails.
See how it worksKeep exploring
Set up “Draft replies to meeting requests with your free times” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.