Skip to content

The moment it happens

Answer Facebook comments and messages from your FAQ in Drive

Questions in comments and Messenger on your Page get a reply drawn from the FAQ documents you keep in Google Drive.

Runs
The moment it happens
Apps
Facebook Pages, Google Drive
AI
Yes, uses the built-in AI allowance
Access
pages_manage_engagement, pages_messaging; drive.readonly

Send this to your assistant

Create a ClickRuntime automation: when someone comments on my Facebook Page or sends a Messenger message, answer from my FAQ document in Drive if it covers the question, and leave it for me if it doesn't.

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 holiday cottage company gets the same questions all day on Facebook: are dogs allowed, is there parking, what time is check-in. The answers are all in a Drive document, but someone still has to copy them into replies, often hours later.

Comments and messages are now answered within a minute from the FAQ document, in a friendly tone. Questions the document doesn't cover are left for the team, so nothing is made up.

What you get out of it

  • Instant answers

    People get a reply while they're still deciding to book.

  • Answers from your own document

    Replies only use what's in your FAQ, so they're accurate.

  • Update once, answer everywhere

    Change the Drive document and the next reply uses the new answer.

  • Hard questions left for you

    Anything not in the FAQ is passed over for a person to answer.

How it works

What happens, step by step

  1. Facebook tells ClickRuntime about each new comment or message on your Page.

  2. It loads your FAQ document from Drive, re-reading it at most once an hour.

  3. AI checks whether the FAQ answers the question and, if it does, writes a short reply.

  4. The reply is posted under the comment or sent in Messenger; questions it can't answer are left for you.

Before it runs live

  • Connect Facebook Pages
  • Connect Google Drive
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Answer Facebook comments and messages from your FAQ in Drivejust nowSucceeded
Facebook · Northwind CottagesYes, well-behaved dogs are welcome at Bramble and Willow cottages, up to two per booking.

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

FAQ_DOC, PAGE_ID, G = "faq-doc-id", "1234567890", "https://graph.facebook.com/v21.0"

@on_event
def handle(event):
    entry = (event.json or {}).get("entry", [{}])[0]
    change = (entry.get("changes") or [{}])[0].get("value", {})
    msg = (entry.get("messaging") or [{}])[0]
    text = change.get("message") or msg.get("message", {}).get("text")
    if not text or change.get("from", {}).get("id") == PAGE_ID:
        return {"skipped": True}
    cache = state.get("faq") or {}
    if time.time() - cache.get("at", 0) > 3600:
        drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
        cache = {"at": time.time(), "text": drive.files().export(fileId=FAQ_DOC, mimeType="text/plain").execute().decode()[:15000]}
        state.set("faq", cache)
    r = ai.generate(f"FAQ:\n{cache['text']}\n\nQuestion: {text[:500]}\nReply briefly using only the FAQ, or say NONE.",
                    max_output_tokens=200).text.strip()
    if r == "NONE":
        return {"answered": False}
    t = {"access_token": credentials.connection("facebook", "work")}
    if change.get("comment_id"):
        http.post(f"{G}/{change['comment_id']}/comments", data={**t, "message": r})
    else:
        http.post(f"{G}/{PAGE_ID}/messages", json={**t, "recipient": {"id": msg["sender"]["id"]}, "message": {"text": r}})
    return {"answered": True}

FAQ

Common questions

What if the FAQ doesn't cover a question?
No reply is sent, so you can answer it yourself. You can ask to be emailed about these.
Does it reply to every comment?
Only to questions. Compliments and general comments are left alone.
How quickly do document changes take effect?
The FAQ is re-read every hour, so updates show up in replies within the hour.
What permissions does it need?
pages_manage_engagement, pages_messaging; drive.readonly. 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 Facebook comments and messages from your FAQ in Drive” from your assistant

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