The moment it happens
Log WhatsApp requests in a sheet with a category
Each request sent to your WhatsApp number is sorted by type and urgency, added to a sheet and acknowledged with a reference number.
- Runs
- The moment it happens
- Apps
- Google Sheets, WhatsApp Business
- AI
- Yes, uses the built-in AI allowance
- Access
- whatsapp_business_messaging; Sheet edit
Send this to your assistant
Create a ClickRuntime automation: when someone messages our WhatsApp number with a request, classify it by category and urgency, add it to the Requests sheet, and reply with a reference number.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A facilities team, an HR department or a small service business takes requests on WhatsApp because that's what people use. But requests in a chat are hard to track: they scroll away, nobody knows which have been dealt with, and urgent ones look the same as routine ones.
Logging each message in a sheet with a category, urgency and reference turns the chat into a proper request list, while the reference number reassures the sender that it's been recorded.
What you get out of it
Every request on a list
Requests stop disappearing up the chat. The sheet shows what came in and when.
Urgent ones stand out
Each row is marked by urgency, so a burst pipe isn't treated like a light bulb.
People know it's logged
A reply with a reference number confirms the request was recorded. That cuts down repeat messages.
Easy reporting
Filter the sheet by category or month to see where requests come from.
How it works
What happens, step by step
Someone sends a request to your WhatsApp number.
AI reads the message and picks a category and urgency.
A row with a reference number, the sender, the message, category and urgency is added to your sheet.
The sender gets a WhatsApp reply with their reference number.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect WhatsApp Business
- 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 WhatsApp Business 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 datetime, timezone
from clickruntime import on_event, credentials, http, ai
SHEET_ID = "your-spreadsheet-id"
SCHEMA = {"type": "object", "properties": {"category": {"type": "string"}, "urgency": {"type": "string", "enum": ["high", "normal", "low"]}}, "required": ["category", "urgency"]}
WA = "https://graph.facebook.com/v20.0/your-phone-number-id/messages"
def wa(to, text):
http.post(WA, headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"},
json={"messaging_product": "whatsapp", "to": to, "type": "text", "text": {"body": text}}).raise_for_status()
def incoming(event):
changes = [c for e in (event.json or {}).get("entry", []) for c in e.get("changes", [])]
return [(m["from"], m["text"]["body"]) for c in changes for m in c["value"].get("messages", []) if m.get("type") == "text"]
@on_event
def handle(event):
vals = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets().values()
for phone, text in incoming(event):
r = ai.generate(text[:1500], system="Classify this request. Category: Maintenance, IT, HR or Billing.", json_schema=SCHEMA, max_output_tokens=30).json
ref = "R" + datetime.now(timezone.utc).strftime("%y%m%d%H%M%S")
row = [ref, datetime.now(timezone.utc).isoformat(timespec="minutes"), phone, text, r["category"], r["urgency"]]
vals.append(spreadsheetId=SHEET_ID, range="Requests!A:F", valueInputOption="RAW", body={"values": [row]}).execute()
wa(phone, f"Thanks, we've logged your request. Your reference is {ref}.")
return {"ok": True}FAQ
Common questions
Which categories does it use?
Can it alert someone about urgent requests?
Does the sender see the category?
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 WhatsApp questions from a product sheet
Customers who message your WhatsApp number get an instant answer drawn from the products and FAQs in your Google Sheet.
See how it worksFollow up unhappy customers on WhatsApp
Feedback is scored for sentiment and logged in your sheet, and customers who were unhappy get a WhatsApp message offering to put it right.
See how it worksGet website leads on WhatsApp and log them in a sheet
Each contact form lead is added to your sheet and sent to your phone on WhatsApp straight away.
See how it worksKeep exploring
Set up “Log WhatsApp requests in a sheet with a category” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.