The moment it happens
Answer Messenger questions and hand off to you
People who message your Page get an answer from your FAQ straight away, and you're emailed when someone needs a person.
- Runs
- The moment it happens
- Apps
- Facebook Pages
- AI
- Yes, uses the built-in AI allowance
- Access
- pages_messaging
Send this to your assistant
Create a ClickRuntime automation: when someone messages my Facebook Page, answer from my FAQ about opening hours, delivery and returns. If they ask for a person or sound upset, email me the conversation and stop replying to them.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Customers message a business Page on Messenger at all hours, and they expect an answer in minutes. A salon gets asked whether Saturday has a free slot at 9 p.m., a shop gets asked where a parcel is, and nobody is awake to reply. Slow answers send people to the next Page in their search, but a bot that keeps answering when the customer is angry or asking for a refund makes things worse.
When a message arrives, Facebook calls ClickRuntime's webhook, which verifies the request, reads the recent conversation history for that person, and uses ClickRuntime's built-in AI to write a reply that is sent straight away. If the AI decides a human is needed, it emails you and pauses the bot for that one customer.
Small businesses with no night staff get the most from it, because the pause means a person takes over cleanly.
What you get out of it
Answer customers outside office hours
A shopper who messages at 10 p.m. gets a reply in seconds instead of finding nothing until morning. That is often the difference between a booked appointment and a customer who went elsewhere.
Hand off before things go wrong
Refund demands and angry messages trigger an email and silence the bot for that person. The customer is never left arguing with software, and you start with the full conversation in front of you.
Stop repeating the same answers
Opening times, delivery areas and sizing come up all day. Letting the AI cover them frees the owner or support person for conversations that need judgment, such as custom orders and complaints.
Keep context across messages
Replies use the recent history for each person, so the bot does not ask for the order number twice. Customers feel followed rather than processed, which reduces abandoned chats. That continuity is what separates a helpful assistant from an irritating one.
Control which customers get the bot
Pausing per user means one escalated customer does not switch off replies for everyone else. You can resume the bot for that person once the matter is resolved. Each customer's status is tracked separately.
How it works
What happens, step by step
When someone messages your Facebook Page, Messenger passes the message to ClickRuntime straight away.
AI reads it along with the last few messages in the conversation and answers using only your FAQ, such as opening hours, delivery and returns.
The answer is sent back to them in Messenger.
If they ask for a person or sound upset, the automation stops replying to them and emails you the conversation so you can take over.
Before it runs live
- Connect Facebook Pages
- 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 Facebook Pages steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, state, ai, notify
G = "https://graph.facebook.com/v21.0"
PAGE_ID = "104857600000000"
def page_token():
user = credentials.connection("facebook", "work")
return http.get(f"{G}/{PAGE_ID}", params={"fields": "access_token", "access_token": user}).json()["access_token"]
FAQ = "Open Mon-Sat 9am-6pm. Delivery 2-4 days, free over $50. Returns within 30 days with receipt."
SCHEMA = {"type": "object", "properties": {"handoff": {"type": "boolean"}, "reply": {"type": "string"}},
"required": ["handoff", "reply"]}
@on_event
def handle(event):
for entry in event.json.get("entry", []):
for m in entry.get("messaging", []):
if "message" not in m or m["message"].get("is_echo"):
continue
user, text = m["sender"]["id"], m["message"].get("text", "")
if state.get(f"paused:{user}"):
continue
history = (state.get(f"history:{user}") or [])[-6:] + [f"Customer: {text}"]
r = ai.generate(f"FAQ: {FAQ}\nConversation:\n" + "\n".join(history) +
"\nAnswer from the FAQ only. Set handoff=true if they ask for a person or sound upset.",
json_schema=SCHEMA, max_output_tokens=200).json
if r["handoff"]:
state.set(f"paused:{user}", True)
notify.email_me("Messenger customer needs you", "\n".join(history))
continue
http.post(f"{G}/{PAGE_ID}/messages", json={"recipient": {"id": user}, "messaging_type": "RESPONSE",
"message": {"text": r["reply"]}}, params={"access_token": page_token()}).raise_for_status()
state.set(f"history:{user}", history + [f"Us: {r['reply']}"])
return {"ok": True}FAQ
Common questions
Does the bot tell customers it is automated?
What makes it hand a conversation to a person?
Is there a limit on when Messenger lets a Page reply?
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
Report shop orders to Meta for better ad targeting
Every order is sent to your Meta pixel as a purchase, so your ads learn from real sales.
See how it worksShare new blog posts on your Page
When your site publishes an article, it appears on your Facebook Page as a link post.
See how it worksPublish an AI-written post with an image every day
Your Page gets a fresh post with a picture each day on topics you chose, and you get the link by email.
See how it worksKeep exploring
Set up “Answer Messenger questions and hand off to you” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.