On a schedule
Log 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.
- Runs
- On a schedule
- Apps
- Google Sheets, Zendesk
- AI
- Yes, uses the built-in AI allowance
- Access
- Zendesk read; sheet editor
Send this to your assistant
Create a ClickRuntime automation: every morning, add a row to my Support Metrics sheet with yesterday's new, solved and open Zendesk tickets. Use AI to spot tickets suggesting a customer might cancel, list them in the Churn tab and post a heads-up to #customer-success.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A customer success manager wants two things from support: a daily count they can chart, and an early warning when an account sounds unhappy. Both mean reading Zendesk every morning. On busy days it does not happen, and the chart has gaps just when it matters most.
Writing the numbers and the risk list to a sheet each morning gives a complete history to chart and a short list of accounts to call.
What you get out of it
A complete daily history
One row per day, with no gaps, makes trends and seasonal peaks easy to chart.
Risk signals with context
Each flagged ticket is logged with the customer and the reason, so the account manager knows what to talk about.
The team hears quickly
A short Slack message points customer success to the new entries without anyone opening the sheet first.
Your own definitions
You decide what counts as a risk signal, from cancellation questions to repeated bug reports.
How it works
What happens, step by step
Every morning, ClickRuntime counts yesterday's new, solved and open tickets in Zendesk.
It adds those numbers as a new row in your Support Metrics sheet.
AI reads yesterday's tickets and picks out those that suggest a customer might leave.
Each flagged ticket is added to the Churn tab with the reason, and a heads-up goes to #customer-success in Slack.
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
- Run it at a different time, more or less often, or only on weekdays
- 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, timedelta
from clickruntime import on_trigger, http, credentials, ai, notify
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"
@on_trigger
def run(event):
day = (date.today() - timedelta(days=1)).isoformat()
count = lambda q: zd("GET", "/search/count", params={"query": f"type:ticket {q}"})["count"]
s = sheets()
s.values().append(spreadsheetId=SHEET_ID, range="Metrics!A:D", valueInputOption="RAW",
body={"values": [[day, count(f"created:{day}"), count(f"solved:{day}"), count("status:open")]]}).execute()
tickets = zd("GET", "/search.json", params={"query": f"type:ticket updated:{day}"})["results"][:80]
if not tickets:
return {"risks": 0}
text = "\n".join(f"{i}. {t['subject']} | {t['description'][:300]}" for i, t in enumerate(tickets))
risks = ai.generate(text, system="List tickets suggesting the customer may cancel or switch, with a short reason.",
json_schema={"type": "object", "properties": {"items": {"type": "array", "items": {"type": "object",
"properties": {"n": {"type": "integer"}, "reason": {"type": "string"}}}}}}, max_output_tokens=500).json["items"]
rows = [[day, tickets[r["n"]]["id"], tickets[r["n"]]["subject"], r["reason"]] for r in risks]
if rows:
s.values().append(spreadsheetId=SHEET_ID, range="Churn!A:D", valueInputOption="RAW", body={"values": rows}).execute()
notify.slack(f"{len(rows)} possible churn signals from yesterday's tickets, see the Churn tab.", channel="#customer-success")
return {"risks": len(rows)}FAQ
Common questions
Which numbers go into the daily row?
How does AI decide a ticket is a churn risk?
Can it skip the Slack message?
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
Keep 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 worksTrack SLA risks and stuck tickets in a sheet
A sheet shows how long each open ticket has left before its deadline, Slack warns you before one breaches, and pending tickets get chased.
See how it worksCheck 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 worksKeep exploring
Set up “Log daily support numbers and churn signals to a sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.