Skip to content

Every 15 minutes

Draft replies to new tickets and email me the list

New Zendesk tickets get a suggested reply as an internal note, and you get an email listing which tickets are ready to review.

Runs
Every 15 minutes
Apps
Gmail, Zendesk
AI
Yes, uses the built-in AI allowance
Access
Zendesk read+write; gmail.send

Send this to your assistant

Create a ClickRuntime automation: every 15 minutes, draft a reply to each new Zendesk ticket with AI and add it as an internal note. Email me a list of the tickets with drafts waiting.

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 one-person support desk at a small e-commerce brand starts each morning with a full queue. Most tickets are delivery, returns and sizing questions with known answers. Typing them out takes hours, and the owner checks the queue from their phone between other jobs.

Drafts waiting on each ticket, plus an email listing them, turn a morning of typing into a few minutes of checking and sending.

What you get out of it

  • Most of the writing is done

    Routine questions arrive with an answer ready to check, so the agent only edits and sends.

  • A list you can read anywhere

    The email shows which tickets have drafts waiting, so you can plan your time before opening Zendesk.

  • You stay in control

    Drafts are internal notes. Nothing reaches a customer until you send it.

  • Consistent policies

    Every draft uses the same return window, delivery times and tone you set in the prompt.

How it works

What happens, step by step

  1. Every 15 minutes, ClickRuntime looks for new Zendesk tickets it has not drafted for yet.

  2. AI reads each customer's message and writes a reply following your policies and tone.

  3. The draft is added to the ticket as an internal note.

  4. You get one email from your Gmail listing the tickets with drafts waiting, with a link to each.

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 Zendesk

What you get

RunsEvery 15 minutes
Draft replies to new tickets and email me the listtoday, 9:00Succeeded
Email · Drafts ready3 reply drafts ready in Zendesk: #5521 Where is my order? · #5523 Exchange for a size M · #5524 Discount code not working

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 Gmail and Zendesk 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.
draft_ai_replies_to_new_zendesk_tickets.pyexample
import base64
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, report_fetched, http, credentials, ai, state

ZD, AGENT = "https://yourcompany.zendesk.com/api/v2", "you@yourcompany.com"

def zd(method, path, **kw):
    r = http.request(method, ZD + path, auth=(f"{AGENT}/token", credentials.secret("ZENDESK_API_TOKEN")), **kw)
    return r.raise_for_status() or (r.json() if r.content else None)


def send_gmail(to, subject, text):
    raw = base64.urlsafe_b64encode(f"To: {to}\r\nSubject: {subject}\r\nContent-Type: text/plain; charset=utf-8\r\n\r\n{text}".encode()).decode()
    build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users().messages().send(userId="me", body={"raw": raw}).execute()
POLICY = "Returns within 30 days, free UK delivery in 2-3 days, friendly and short."

@on_trigger
def run(event):
    seen = set(state.get("seen") or [])
    new = [t for t in zd("GET", "/search.json", params={"query": "type:ticket status:new"})["results"] if t["id"] not in seen]
    report_fetched(len(new))
    if not new:
        return {"summary": "No new tickets"}
    lines = []
    for t in new:
        draft = ai.generate(t["description"][:3000], system=f"Draft a reply to this customer. {POLICY}", max_output_tokens=400).text
        zd("PUT", f"/tickets/{t['id']}", json={"ticket": {"comment": {"body": f"AI draft:\n\n{draft}", "public": False}}})
        lines.append(f"#{t['id']} {t['subject']}\nhttps://yourcompany.zendesk.com/agent/tickets/{t['id']}")
        seen.add(t["id"])
    send_gmail("you@yourcompany.com", f"{len(lines)} reply drafts ready in Zendesk", "\n\n".join(lines))
    state.set("seen", sorted(seen)[-2000:])
    return {"drafted": len(lines)}

FAQ

Common questions

Can it send the reply without me?
It is possible, but we do not recommend it. Keeping drafts as notes means a person checks every answer before a customer sees it.
How often will I get the email?
Only when there are new drafts, so a quiet hour sends nothing.
Can I teach it our policies?
Yes. Add your return policy, delivery times and tone to the prompt and every draft follows them.
What permissions does it need?
Zendesk read+write; gmail.send. 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 “Draft replies to new tickets and email me the list” from your assistant

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