Every 10 minutes
Draft replies to new Zendesk tickets and log them
Each new ticket gets a suggested reply as a private note, and every suggestion is logged in a sheet so you can see how often it was used.
- Runs
- Every 10 minutes
- Apps
- Google Sheets, Zendesk
- AI
- Yes, uses the built-in AI allowance
- Access
- Zendesk agent; sheet editor
Send this to your assistant
Create a ClickRuntime automation: every 10 minutes, take new Zendesk tickets, write a suggested reply with AI, add it as a private note on the ticket and log the ticket and draft in my Drafts sheet.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A support team answers the same twenty questions all day. Agents type out the same explanations, look up the same help links and lose time on tickets that need no thought. The team lead wants to try AI drafts, but also wants to know whether the drafts are actually any good before relying on them.
A draft on every new ticket gives agents a starting point, and the sheet of every suggestion lets the lead check quality and see where drafts help most.
What you get out of it
A head start on every ticket
Agents edit a draft instead of typing from nothing, which is quickest on the repetitive questions.
Nothing goes to customers unchecked
Drafts are private notes. An agent reads, edits and sends the reply themselves.
Evidence for the trial
The sheet lists every suggestion, so the lead can compare drafts with what was actually sent before deciding how far to rely on them.
Consistent answers
Drafts follow the same tone and include the same help links, so customers get similar answers whichever agent replies.
How it works
What happens, step by step
Every 10 minutes, ClickRuntime looks for new Zendesk tickets it has not drafted for yet.
AI reads the customer's message and writes a suggested reply using the guidance you gave it.
The draft is added to the ticket as a private note for the agent.
The ticket number, subject and draft are logged as a new row in your Drafts sheet.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- 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 Google Sheets and Zendesk steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import date
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)
sheets = lambda: build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
SHEET_ID = "your-spreadsheet-id"
GUIDE = "Friendly, concise, British English. Refunds within 30 days. Help centre: https://help.example.com"
@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"}
rows = []
for t in new:
draft = ai.generate(f"Subject: {t['subject']}\n\n{t['description'][:3000]}",
system=f"Draft a reply to this support ticket. {GUIDE}", max_output_tokens=400).text
zd("PUT", f"/tickets/{t['id']}", json={"ticket": {"comment": {"body": f"Suggested reply:\n\n{draft}", "public": False}}})
rows.append([date.today().isoformat(), t["id"], t["subject"], draft, ""])
seen.add(t["id"])
sheets().values().append(spreadsheetId=SHEET_ID, range="Drafts!A:E", valueInputOption="RAW", body={"values": rows}).execute()
state.set("seen", sorted(seen)[-2000:])
return {"drafted": len(rows)}FAQ
Common questions
Can I give the AI our help articles or policies?
Does the customer see the draft?
What goes into the sheet?
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
Check payment complaints against your payments sheet
Tickets about payments are matched to your payments sheet, and the genuine problems are raised to urgent and flagged in Slack.
See how it worksTurn support emails into Zendesk tickets and log them
Support emails arriving in Gmail become Zendesk tickets with a category, and each one is logged in a sheet.
See how it worksLog daily support numbers and churn signals to a sheet
Every day a row of ticket numbers goes into your metrics sheet, along with any customers whose tickets hint they might leave.
See how it worksKeep exploring
Set up “Draft replies to new Zendesk tickets and log them” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.