Skip to content

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.

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

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

  2. AI reads the customer's message and writes a suggested reply using the guidance you gave it.

  3. The draft is added to the ticket as a private note for the agent.

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

RunsEvery 10 minutes
Draft replies to new Zendesk tickets and log themtoday, 9:00Succeeded
Zendesk · Internal noteSuggested reply: Hi Sam, sorry about the double charge on your Acme Pro plan. I've refunded the second payment of £29; it should reach your card within 5 working days.

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 Google Sheets 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.
ai_draft_replies_for_new_zendesk_tickets.pyexample
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?
Yes. Paste your key policies, links and tone guidance into the prompt, and the drafts will use them.
Does the customer see the draft?
No. It is added as an internal note that only agents can see.
What goes into the sheet?
The ticket number, subject, date and the draft text, with an empty column where the agent can mark whether it was useful.
What permissions does it need?
Zendesk agent; sheet editor. 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 Zendesk tickets and log them” from your assistant

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