Every 10 minutes
Get reply drafts for customer emails
A reply is drafted for each new customer email and saved in Gmail, and Slack tells you it's ready to review.
- Runs
- Every 10 minutes
- Apps
- Gmail, Slack
- AI
- Yes, uses the built-in AI allowance
- Access
- Gmail gmail.modify; Slack chat:write
Send this to your assistant
Create a ClickRuntime automation: every 10 minutes, write a reply draft for each new customer email, save it in Gmail, and send me a Slack message with a summary and a link to the draft.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Customer emails pile up while you are in meetings, and replying to each from scratch means reading the thread, remembering the policy and typing the same explanation for the tenth time this month. Replies slip to the next day, and the customer who asked a simple question about shipping or billing wonders whether anyone is there.
Every 10 minutes each new email is read, and the built-in AI in ClickRuntime writes a suggested reply. A draft is created in Gmail in the right thread, and a message in Slack tells you which drafts are ready and who they are for. Nothing is sent: you open the draft, adjust it and press send yourself.
Small support teams, agencies and owner-operators answering customers directly get a lot out of having a first draft always ready.
What you get out of it
Replies go out the same day
With a draft waiting, answering takes a minute of review and not ten minutes of writing, so customers hear back before they have time to feel ignored. Speed and reliability are what customers remember.
You stay in control of what is sent
Because drafts are never sent automatically, a wrong tone or incorrect fact gets caught by you before it reaches the customer, which protects your reputation. That safeguard is the whole point of keeping the final send manual.
The Slack note tells you when to look
Instead of checking Gmail drafts for new items, the message in Slack names each ready draft, so you act exactly when something needs you. It saves one more mailbox you would otherwise check repeatedly.
Consistent answers to common questions
Repeated questions about refunds or delivery get similar, accurate wording each time, which reduces contradictory replies from different people on your team. Customers receive the same facts regardless of who is answering that day.
Evenings are protected
Work that would have been done after hours at the kitchen table is mostly handled during the day, because drafts are ready when you take a break. A calmer workday and a clear evening are real benefits for small business owners.
How it works
What happens, step by step
Every 10 minutes, ClickRuntime checks your Gmail primary inbox for new customer emails, skipping any it has already handled.
AI writes a reply to each one.
The reply is saved as a draft in Gmail, ready for you to edit and send.
A message in your #me Slack channel tells you who the draft is for, with a link to open it.
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 Slack, then invite the app to the channel (type /invite @ClickRuntime there)
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 Google Sheets
- Combine it with other Gmail and Slack steps into one automation
Under the hood
The code that runs this automation
import base64
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, state, ai, notify, report_fetched
@on_trigger
def run(event):
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
seen = set(state.get("seen") or [])
msgs = gmail.users().messages().list(userId="me", q="in:inbox category:primary newer_than:1d", maxResults=15).execute().get("messages", [])
new = [m for m in msgs if m["id"] not in seen]
report_fetched(len(new))
if not new:
return {"new": 0}
for m in new:
msg = gmail.users().messages().get(userId="me", id=m["id"], format="metadata", metadataHeaders=["From", "Subject"]).execute()
h = {x["name"]: x["value"] for x in msg["payload"]["headers"]}
reply = ai.generate(f"From: {h['From']}\nSubject: {h['Subject']}\n{msg['snippet']}", max_output_tokens=350,
system="Write a short, friendly customer reply. Don't promise refunds or dates.").text
draft = EmailMessage()
draft["To"], draft["Subject"] = h["From"], "Re: " + h["Subject"]
draft.set_content(reply)
created = gmail.users().drafts().create(userId="me", body={"message": {
"raw": base64.urlsafe_b64encode(draft.as_bytes()).decode(), "threadId": msg["threadId"]}}).execute()
notify.slack(f"✉️ Draft ready for {h['From']}: {h['Subject']}\n"
f"https://mail.google.com/mail/u/0/#drafts?compose={created['message']['id']}", channel="#me")
state.set("seen", [m["id"] for m in msgs])
return {"drafts": len(new)}FAQ
Common questions
Does it ever send the reply itself?
Can the drafts follow my company's policies?
Which emails get a draft?
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 your important emails in Slack
New mail is sorted and labelled for you, and the urgent ones are posted to Slack with a one-line summary.
See how it worksDraft answers to RFP questionnaires
When an RFP arrives by email, answers are drafted from your company details and saved as a Gmail reply for you to check.
See how it worksGet a quick summary of every CV you receive
When a CV arrives by email, your hiring channel gets a short profile of the candidate.
See how it worksKeep exploring
Set up “Get reply drafts for customer emails” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.