Skip to content

The moment it happens

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.

Runs
The moment it happens
Apps
Google Sheets, WhatsApp Business
AI
Yes, uses the built-in AI allowance
Access
whatsapp_business_messaging; Sheet read

Send this to your assistant

Create a ClickRuntime automation: when a customer messages my WhatsApp number, answer them using the products and FAQs in my Google Sheet, and keep the last few messages so follow-up questions make sense.

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 small online shop gets the same WhatsApp questions all day: is this in stock, how much is delivery, do you ship abroad. The owner answers between other jobs, and messages that arrive in the evening wait until morning.

Answering from a sheet the owner already keeps up to date gives customers a correct reply in seconds at any hour, and changing an answer is as simple as editing a cell.

What you get out of it

  • Answers at any hour

    Customers get a reply in seconds, including evenings and weekends. Fewer of them give up and buy elsewhere.

  • Answers you control

    The bot only uses what's in your sheet. Update a price or a policy in one cell and every answer changes.

  • Follow-up questions make sense

    Recent messages are remembered for a short while, so 'and in blue?' is understood.

  • Time back for real conversations

    Routine questions are handled for you. You step in for the ones that need a person.

How it works

What happens, step by step

  1. A customer sends a message to your WhatsApp number.

  2. It reads the products and FAQs from your Google Sheet and the last few messages from this customer.

  3. AI writes a short answer using only what's in the sheet, or says it will check with the team.

  4. The reply is sent on WhatsApp and the conversation is remembered briefly for follow-ups.

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
Answer WhatsApp questions from a product sheetjust nowSucceeded
WhatsApp · CustomerYes, the oak desk is in stock. Delivery is free over £150 and takes 3–5 working days.

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.
whatsapp_support_bot_answering_from_a_sheet.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http, state, ai

SHEET_ID = "your-spreadsheet-id"
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):
    rows = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False) \
        .spreadsheets().values().get(spreadsheetId=SHEET_ID, range="FAQ!A:D").execute().get("values", [])
    facts = "\n".join(" | ".join(r) for r in rows)[:12000]
    for phone, text in incoming(event):
        history = state.get(f"h:{phone}") or []
        answer = ai.generate("\n".join(history[-6:] + [f"Customer: {text}"]), max_output_tokens=200,
                             system=f"Answer briefly using only these facts. If unsure, say you'll check with the team.\n{facts}").text.strip()
        wa(phone, answer)
        state.set(f"h:{phone}", (history + [f"Customer: {text}", f"You: {answer}"])[-6:])
    return {"ok": True}

FAQ

Common questions

What should the sheet contain?
A row per product or question, with columns like name, price, stock and answer. Plain language works best.
What happens if the answer isn't in the sheet?
The bot says it will check with the team instead of guessing. You can have those questions emailed to you.
How much history is kept?
The last few messages per customer, for a few hours. Older history is dropped.
What permissions does it need?
whatsapp_business_messaging; Sheet read. 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 “Answer WhatsApp questions from a product sheet” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.