AI WhatsApp Customer Support Agent
· By AI Compare
Answer common customer questions on WhatsApp with AI and pass the chat to your support team when needed.
What you will build
A customer support agent on WhatsApp that answers common questions from your knowledge base, keeps conversation context, and passes the chat to your support team with a summary when it cannot help. It is based on n8n templates such as "Handle WhatsApp support chats with OpenRouter, Pinecone and Gemini".
Architecture
| Layer | Tool | Role |
|---|---|---|
| Channel | WhatsApp Business Cloud API | Receives and sends messages |
| Orchestration | n8n | Routing, logic, logging |
| Model | OpenRouter | One API key, many models (OpenAI, Anthropic, Google, open models) |
| Knowledge | Pinecone + Gemini embeddings | Search your FAQs, policies and product info |
| Memory | Simple Memory or Postgres Chat Memory | Context per customer phone number |
| Support team | Your helpdesk, Slack or email | Takes over escalated chats |
Build the knowledge base first
- Collect FAQs, return policy, shipping info, product specs and pricing rules.
- Create an ingestion workflow (like our Google Drive RAG workflow): load documents → split into chunks → Embeddings Google Gemini → Pinecone Vector Store insert.
- Use one index and namespace for support content only.
The support workflow
- WhatsApp Trigger → IF message (ignore delivery and read statuses).
- Look up the customer in your CRM or database by phone number; pass name and order history to the agent.
- Check whether an agent has taken over. If someone on your team is already handling this customer, do not let the AI reply; just log the message.
- AI Agent with:
- OpenRouter Chat Model
- Memory keyed by phone number
- Pinecone Vector Store tool for the knowledge base
- Optional tools: order status lookup (HTTP Request to your shop API), create ticket
- Non-text messages (voice, images) get a polite reply asking for text, or are transcribed if you add that branch.
- WhatsApp: Send message with the answer.
Handoff to your support team
Tell the agent in its system message when to escalate: refunds, complaints, legal questions, angry customers, or when the knowledge base has no answer. On escalation:
- Create a case in your helpdesk (or a row in a sheet).
- Generate a short summary of the conversation with the model.
- Notify the team in Slack with the summary and a link.
- Tell the customer that someone from the support team will reply, and stop AI replies for that customer until the case is closed.
Rules and costs
- Replies are free-form within 24 hours of the customer's last message; after that, only approved templates.
- Meta charges per conversation/message by category and country.
- Model costs depend on the model chosen in OpenRouter; use a cheaper model for simple FAQs.
Measure it
Log every conversation with resolved-by-AI vs escalated, response time and customer rating. Review escalations weekly and add missing answers to the knowledge base.


