The moment it happens
Sort incoming requests by urgency into Supabase and a team sheet
Each customer request is classified by urgency with AI, saved to Supabase and added to the sheet your team works from, with urgent ones posted to Slack.
- Runs
- The moment it happens
- Apps
- Google Sheets, Supabase
- AI
- Yes, uses the built-in AI allowance
- Access
- Supabase write; sheet edit
Send this to your assistant
Create a ClickRuntime automation: when a request is posted to this link, classify its urgency and type with AI, insert it into my Supabase requests table, add a row to my Dispatch sheet, and post urgent ones to #dispatch.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A maintenance company receives requests from a website form and a messaging line. A burst pipe and a dripping tap arrive in the same queue, and the dispatcher reads every message to decide what to do first.
Classifying each request as it arrives and adding it to the dispatch sheet with its urgency means urgent jobs are seen first, and the full record lands in Supabase for reporting.
What you get out of it
Urgent jobs first
Emergencies are flagged in Slack the moment they come in.
A sheet the team already uses
Dispatchers work from a sorted list without learning a new tool.
Complete records
Every request is stored in Supabase for reporting and billing.
Consistent triage
Every message is judged by the same rules, at any hour.
How it works
What happens, step by step
A customer request arrives at your automation's link.
AI reads it and decides the urgency and type of job.
The request is saved to your Supabase requests table.
A row is added to your Dispatch sheet with the urgency.
Urgent requests are also posted to #dispatch in Slack.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect Supabase
- Paste your automation's link into the other app's webhook settings
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 Supabase steps into one automation
Under the hood
The code that runs this automation
from datetime import datetime, timezone
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http, notify, ai
SHEET_ID = "your-spreadsheet-id"
SUPABASE = "https://your-project.supabase.co/rest/v1"
def sb(method, path, **kw):
key = credentials.secret("SUPABASE_KEY")
r = http.request(method, f"{SUPABASE}/{path}", **kw, headers={"apikey": key, "Authorization": f"Bearer {key}", "Prefer": "return=representation,resolution=merge-duplicates"})
return r.raise_for_status() or (r.json() if r.content else None)
SCHEMA = {"type": "object", "properties": {"urgency": {"enum": ["urgent", "soon", "routine", "review"]}, "type": {"type": "string"}}}
@on_event
def handle(event):
req = event.json or {}
c = ai.generate(f"Classify this maintenance request. Urgent = safety risk or active damage.\n{req.get('message', '')[:2000]}",
json_schema=SCHEMA, max_output_tokens=40).json
row = sb("POST", "requests", json={"name": req.get("name"), "phone": req.get("phone"), "address": req.get("address"),
"message": req.get("message"), **c, "event_id": event.event_id})[0]
build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Dispatch!A:F", valueInputOption="RAW", body={"values": [[
datetime.now(timezone.utc).isoformat(timespec="minutes"), c["urgency"], c["type"], req.get("name"), req.get("address"), row["id"]]]}).execute()
if c["urgency"] == "urgent":
notify.slack(f":rotating_light: Urgent {c['type']}: {req.get('name')}, {req.get('address')} – {req.get('message', '')[:200]}", channel="#dispatch")
return {"id": row["id"], **c}FAQ
Common questions
What urgency levels are used?
What if AI isn't sure?
Where can requests come from?
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
Answer support questions from Supabase and log each one in a sheet
Questions sent to your support link get an AI answer drawn from your Supabase knowledge base, and every question, answer and confidence score is logged in a sheet for review.
See how it worksFind people asking for tools like yours and list them in a sheet
Every hour, posts from people looking for a tool like yours are scored, stored in Supabase and added to a leads sheet for your team.
See how it worksList low-stock items from Supabase in a purchasing sheet
Each night, items in your Supabase inventory that are below their reorder level are written to your purchasing sheet, and you get an email to review and approve them.
See how it worksKeep exploring
Set up “Sort incoming requests by urgency into Supabase and a team sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.