Skip to content

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.

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

  1. Someone sends a request to your WhatsApp number.

  2. AI reads the message and picks a category and urgency.

  3. A row with a reference number, the sender, the message, category and urgency is added to your sheet.

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

RunsThe moment it happens
Log WhatsApp requests in a sheet with a categoryjust nowSucceeded
WhatsApp · RequestsThanks, we've logged your request. Your reference is R261019093012.

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 WhatsApp Business 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.
log_and_classify_whatsapp_requests_in_a_sheet.pyexample
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?
The ones you list, such as Maintenance, IT, HR or Billing.
Can it alert someone about urgent requests?
Yes. Urgent rows can also be sent to a manager by email or WhatsApp.
Does the sender see the category?
Only the reference number is sent back by default. You can include the category if it helps.
What permissions does it need?
whatsapp_business_messaging; Sheet edit. 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 for each event the app sends.
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 “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.