Skip to content

The moment it happens

Answer WhatsApp questions from your Google Drive documents

Customers ask questions on WhatsApp and get answers drawn from the FAQ and policy documents in your Drive folder.

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

Send this to your assistant

Create a ClickRuntime automation: when a customer messages my WhatsApp number, answer from the Google Docs in my Customer FAQ folder in Drive, refreshing the document text once a day.

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

Many small businesses already have their policies, prices and FAQs written up in Google Docs. Customers ask about the same things on WhatsApp, and someone copies answers from those docs by hand.

Answering straight from the documents in a Drive folder means the bot always says what your docs say, and updating an answer is just editing the doc you already maintain.

What you get out of it

  • Answers from your own docs

    The bot repeats your policies, not guesses.

  • Update by editing a doc

    Change a Google Doc and the bot uses the new text within a day.

  • Fast replies

    Customers get answers in seconds, at any hour.

  • Light on resources

    Document text is cached once a day instead of read on every message.

How it works

What happens, step by step

  1. A customer messages your WhatsApp number.

  2. The text of your Drive FAQ documents is loaded from a copy refreshed once a day.

  3. AI writes a short answer using only those documents, or says the team will follow up.

  4. The answer is sent back on WhatsApp.

Before it runs live

  • Connect Google Drive
  • 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 your Google Drive documentsjust nowSucceeded
WhatsApp · CustomerYou can cancel up to 48 hours before your Northwind Yoga class for a full refund. After that, we offer a credit.

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

FOLDER_ID = "your-folder-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"]
drive = lambda: build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)

def docs_text():
    cache = state.get("docs") or {}
    if time.time() - cache.get("at", 0) > 86400:
        files = drive().files().list(q=f"'{FOLDER_ID}' in parents and mimeType='application/vnd.google-apps.document'").execute()["files"]
        text = "\n\n".join(drive().files().export(fileId=f["id"], mimeType="text/plain").execute().decode()[:4000] for f in files)
        cache = {"at": time.time(), "text": text[:20000]}
        state.set("docs", cache)
    return cache["text"]

@on_event
def handle(event):
    for phone, text in incoming(event):
        answer = ai.generate(text[:1000], max_output_tokens=200,
                             system=f"Answer briefly from these documents only. If not covered, say the team will follow up.\n{docs_text()}").text
        wa(phone, answer.strip())
    return {"ok": True}

FAQ

Common questions

Which documents does it read?
Google Docs in the folder you choose. Keep internal documents somewhere else.
How quickly do edits show up?
Within a day, when the cached text is refreshed. You can trigger a refresh by running it manually.
What if the docs don't cover a question?
The bot says the team will follow up instead of guessing.
What permissions does it need?
WhatsApp messaging; Drive 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 your Google Drive documents” from your assistant

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