The moment it happens
Answer WhatsApp customers with AI that remembers the chat
Customers get a sensible answer in seconds that takes their earlier messages into account, and you get an email when someone wants a person.
- Runs
- The moment it happens
- Apps
- WhatsApp Business
- AI
- Yes, uses the built-in AI allowance
- Access
- whatsapp_business_messaging, whatsapp_business_management
Send this to your assistant
Create a ClickRuntime automation: when someone messages our WhatsApp number, reply using the opening hours, prices and delivery info below, remember each customer's last 10 messages, and email me at owner@example.com if they ask to speak to someone.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A customer writes to a business WhatsApp number at 10 p.m. asking whether the blue jacket comes in a large and when it would arrive. Nobody answers until morning, and by then the person bought elsewhere. Staff who do answer spend the day typing the same replies, and each new message starts from zero because they have to scroll back through the chat to remember what the customer already said.
When a message arrives on your WhatsApp Business number, the automation loads that customer's earlier conversation, asks ClickRuntime's built-in AI to write a reply using it, sends the answer back on WhatsApp, and saves the updated history. If the question is beyond what it should handle, it emails you so a person can take over.
It fits shops, clinics and service providers who get repetitive questions and want fast, context-aware first replies.
What you get out of it
Customers get an answer in seconds
A reply at 10 p.m. keeps a buyer who would otherwise move on to a competitor, so a meaningful share of after-hours enquiries turn into sales or bookings instead of lost chances nobody ever knew about.
Memory avoids asking twice
Because earlier messages are loaded, the reply knows the customer already gave their size or order number. They are not asked again, which feels respectful and shortens conversations that would otherwise drag on for a dozen messages.
Staff time goes to harder questions
Routine questions about hours, sizes or delivery are handled automatically, leaving people free for complaints, custom requests and sales conversations where judgment and empathy genuinely change the outcome for the customer.
Escalation by email catches the hard cases
When a question needs a person, you get an email with the context, so nothing sensitive is left to an automated reply and the customer is not stuck going around in circles with a bot.
A consistent voice
Replies follow the guidance you set, so a customer gets a similar tone whether they write on Monday or on Sunday night, and new staff do not each invent their own wording for the same policy.
How it works
What happens, step by step
When a customer messages your WhatsApp Business number, ClickRuntime picks it up straight away.
It looks up your earlier conversation with that customer, so the reply takes past messages into account.
AI writes a short answer about your business and ClickRuntime sends it back on WhatsApp within seconds.
If the customer asks for a person, or AI can't help, you get an email so you can step in.
Before it runs live
- Connect WhatsApp Business
- 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 WhatsApp Business steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, state, ai, notify
PHONE_NUMBER_ID = "123456789012345"
BUSINESS = "Northwind Bakery. Open 8–18 Mon–Sat. Orders by 4pm for next-day pickup."
@on_event
def handle(event):
value = event.json["entry"][0]["changes"][0]["value"]
if "messages" not in value:
return {"skipped": "status update"}
msg = value["messages"][0]
sender, text = msg["from"], msg.get("text", {}).get("body", "")
history = state.get(f"chat:{sender}") or []
history.append(f"Customer: {text}")
out = ai.generate("\n".join(history[-20:]), system=f"You reply to WhatsApp customers for {BUSINESS} Be brief. Set human=true if they ask for a person or you can't help.",
json_schema={"type": "object", "properties": {"reply": {"type": "string"}, "human": {"type": "boolean"}}}, max_output_tokens=250).json
http.post(f"https://graph.facebook.com/v21.0/{PHONE_NUMBER_ID}/messages",
headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"},
json={"messaging_product": "whatsapp", "to": sender, "type": "text", "text": {"body": out["reply"]}})
history.append(f"Us: {out['reply']}")
state.set(f"chat:{sender}", history[-20:])
if out["human"]:
notify.email_me(f"WhatsApp: +{sender} wants a person", "\n".join(history[-6:]))
return {"replied": True, "escalated": out["human"]}FAQ
Common questions
Does the AI reply count against WhatsApp's 24-hour window?
Can I stop the AI from answering certain topics?
How much of the conversation does it remember?
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
Track spending by texting it to WhatsApp
Each expense you text is logged with a category, you see today's total in the reply, and a monthly breakdown arrives on the 1st.
See how it worksReply to common WhatsApp questions with set answers
People who type 'hours', 'price' or 'menu' get your fixed answer at once, and everyone else gets your welcome menu.
See how it worksSend a WhatsApp confirmation when someone books
Each new booking or sign-up gets your approved template on WhatsApp with their name and details filled in.
See how it worksKeep exploring
Set up “Answer WhatsApp customers with AI that remembers the chat” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.