Every 10 minutes
Turn 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.
- Runs
- Every 10 minutes
- Apps
- Google Sheets, Zendesk
- AI
- Optional
- Access
- Zendesk agent; sheet editor; Gmail read
Send this to your assistant
Create a ClickRuntime automation: every 10 minutes, take new emails in my Gmail with the label Support, create a Zendesk ticket for each with an AI-chosen category, and add a row to my Intake sheet.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small team handles support from a shared Gmail inbox but wants to move to Zendesk without switching the address customers already use. Forwarding rules lose the original sender, and nobody has time to copy emails across. The operations lead also wants a simple log of what came in and how it was categorised.
Creating tickets from the labelled emails keeps the customer-facing address unchanged, and the sheet gives a running record of every request.
What you get out of it
Keep your existing support address
Customers carry on emailing the address they know; tickets appear in Zendesk behind the scenes.
Categories from the start
Each ticket arrives tagged as billing, bug, question or feedback, so it lands with the right person.
A simple intake log
The sheet shows every request with its date, sender and category, for anyone who wants to count or audit them.
No copying between tools
Agents stop pasting emails into Zendesk by hand.
How it works
What happens, step by step
Every 10 minutes, ClickRuntime looks for new emails in Gmail with the Support label.
If AI is available, it reads each email and picks a category such as billing, bug or question.
A Zendesk ticket is created with the sender as the requester and the category as a tag.
A row with the date, sender, subject, category and ticket number is added to your Intake sheet.
The email is marked as handled, so it is never turned into a ticket twice.
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 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)
SHEET_ID = "your-spreadsheet-id"
def categorise(text):
try: return ai.generate(text, system="One word: billing, bug, question or feedback.", max_output_tokens=5).text.strip().lower()
except ai.AIError: return ""
@on_trigger
def run(event):
creds = Credentials(credentials.connection("google", "work"))
gmail = build("gmail", "v1", credentials=creds, cache_discovery=False).users()
seen, rows = set(state.get("seen") or []), []
ids = [m["id"] for m in gmail.messages().list(userId="me", q="label:support newer_than:1d").execute().get("messages", []) if m["id"] not in seen]
report_fetched(len(ids))
if not ids:
return {"summary": "No new emails"}
for mid in ids:
h = {x["name"]: x["value"] for x in (m := gmail.messages().get(userId="me", id=mid, format="full").execute())["payload"]["headers"]}
cat = categorise(f"{h['Subject']}\n{m['snippet']}")
t = zd("POST", "/tickets", json={"ticket": {"subject": h["Subject"], "comment": {"body": m["snippet"]},
"requester": {"email": h["From"].split("<")[-1].strip(">"), "name": h["From"].split("<")[0].strip()}, "tags": [cat] if cat else []}})["ticket"]
rows.append([h["Date"], h["From"], h["Subject"], cat, t["id"]])
seen.add(mid)
build("sheets", "v4", credentials=creds, cache_discovery=False).spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Intake!A:E", valueInputOption="RAW", body={"values": rows}).execute()
state.set("seen", sorted(seen)[-2000:])
return {"tickets": len(rows)}FAQ
Common questions
Does the customer become the ticket requester?
Does it need AI to work?
Could Zendesk's own email channel do this?
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 worksDraft 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.
See how it worksKeep a Google Sheet of your Zendesk tickets
A sheet lists your tickets with status, tags and dates, updated every hour, ready for reporting or building help articles.
See how it worksKeep exploring
Set up “Turn support emails into Zendesk tickets and log them” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.