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.
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
Every 15 minutes, ClickRuntime looks for new Zendesk tickets it has not drafted for yet.
AI reads each customer's message and writes a reply following your policies and tone.
The draft is added to the ticket as an internal note.
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
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 Zendesk steps into one automation
Under the hood
The code that runs this automation
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?
How often will I get the email?
Can I teach it our policies?
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
Email billing about payment tickets as they arrive
New tickets about payments are tagged urgent in Zendesk, and your billing team gets an email about each one straight away.
See how it worksGet a weekly email summarising your Zendesk tickets
Every Monday you get an email with the main themes in last week's tickets, how customers felt and anything unusual.
See how it worksFollow up on Zendesk tickets waiting on the customer
Each morning, customers whose tickets have been pending for a few days get a polite check-in email, and you get the list.
See how it worksKeep exploring
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.