Skip to content

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.

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

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

  1. Every 10 minutes, ClickRuntime checks your Gmail primary inbox for new customer emails, skipping any it has already handled.

  2. AI writes a reply to each one.

  3. The reply is saved as a draft in Gmail, ready for you to edit and send.

  4. 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

RunsEvery 10 minutes
Get reply drafts for customer emailstoday, 9:00Succeeded
Slack · #me✉️ Draft ready for jamie@northwind.example: Where is my order #1042? https://mail.google.com/mail/u/0/#drafts?compose=…

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 Google Sheets
  • Combine it with other Gmail and Slack 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.
ai_reply_drafts_with_a_slack_heads_up.pyexample
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?
No. It only creates a draft inside the email thread in Gmail. Sending is always a manual step by you, so you can edit, correct or delete the draft before anything leaves your account. Nothing is ever sent without you.
Can the drafts follow my company's policies?
Yes. Give your AI assistant the policies and tone to follow, for example refund windows or how formal to be, and the instructions are used each time a draft is written after you approve them.
Which emails get a draft?
New emails that look like customer messages needing an answer. You can restrict it to a label, a sender domain or addresses like support@, so newsletters and notifications are not treated as questions. It will skip everything else.
What permissions does it need?
Gmail gmail.modify; Slack chat:write. 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 each time it checks. Checks that find nothing new and stop right away aren't counted.
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 “Get reply drafts for customer emails” from your assistant

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