Case study  ·  Chat & Support

A WhatsApp support agent that answers from your own policies and hands hard cases to a person

It answers customers from the business's knowledge base, scores its own confidence, and passes refunds, complaints and anything it does not know to a person on Slack with the full context.

The problem

Small businesses get the same WhatsApp questions all day: shipping times, return policy, delivery costs. Answering them by hand takes hours, and messages that arrive after closing wait until morning.

The usual fix is a basic chatbot. It either shows canned menu buttons or makes things up. Both lose customers. A wrong answer about a refund is worse than no answer.

How it works

The agent has two parts. The first loads the store's policies into a knowledge base. The second handles each incoming message.

n8n workflow with two lanes: a knowledge base loader that embeds store documents, and the live path from WhatsApp message to support agent, response parser, needs-human check, Slack escalation, log and WhatsApp reply
The whole workflow. The top lane loads the knowledge base. The bottom lane runs on every message.

Loading the knowledge base

One manual step loads the shipping and returns rules, turns them into embeddings so they can be searched by meaning, and stores them. When a policy changes, we run it again. No code changes.

Handling a message

A customer texts the WhatsApp number. The agent searches the knowledge base for the right policy and writes a reply. With the reply it returns a confidence level and a yes or no on whether a person is needed.

If it is confident and the question is routine, it replies at once and logs the conversation. If not, it posts an alert to Slack with the customer's number, the confidence level and a draft reply, and tells the customer a person will follow up.

The same n8n workflow after a run, with the knowledge base loader steps marked complete
After a run. The loader has filled the knowledge base the agent searches.

A routine question

A customer asked how much express shipping costs. The agent searched the knowledge base and replied that express shipping costs $15 and arrives in 1 to 2 business days, and that orders over $50 ship free. Confidence was high and no person was needed. The numbers came from the store's policy, not from the model.

WhatsApp conversation where the customer asks about express shipping and the agent replies with the price, delivery time and free shipping threshold, with the sandbox code, phone number and a name blurred
A routine question answered from policy. The sandbox code, number and name are blurred.

A refund request

A customer wrote that their order arrived broken and they wanted a refund. The agent treated it as a dispute it should not handle on its own. Confidence was low and it flagged the message for a person. It posted the alert to Slack and told the customer someone would get back to them shortly.

WhatsApp conversation showing the shipping answer, then a refund request and the agent's reply that a team member will follow up
The refund request. The agent does not try to settle it.
Slack channel support-escalations with a Human needed alert showing the customer, a low confidence level and a draft reply, with the customer number and staff name blurred
The handoff in Slack, with a draft reply for the team to review.

Every exchange is written to a Google Sheet.

Google Sheet named WhatsApp Logs with columns for reply, confidence, needs human and customer, with customer numbers blurred
The conversation log. Customer numbers are blurred.

What a person still handles

  • Refunds, complaints and disputes. The agent drafts a reply, a person decides.
  • Anything the knowledge base does not cover. The agent says so instead of guessing.
  • Keeping the policies current. When a rule changes, someone updates the documents and reloads them.

Built with

  • n8n
  • OpenAI
  • RAG
  • Twilio
  • WhatsApp
  • Slack
  • Google Sheets

n8n for the automation, OpenAI GPT-4o-mini for the agent, a vector store for the knowledge base, Twilio for WhatsApp, Slack for the handoff and Google Sheets for the log. This build keeps the knowledge base in memory. For a live deployment we would move it to a persistent vector database such as Pinecone or Supabase, so it survives restarts and can hold a full catalog. The rest stays the same.

Your build starts with the arithmetic.

Bring a week of real examples to the free audit. We come back with the three worth doing first, what each is worth, and a fixed price. If a cheaper tool already covers it, we say so.

Book the free audit →