Zalo OA Chatbot with n8n: Automated Replies
A Zalo OA chatbot built with n8n — often just called a Zalo n8n chatbot — replies to customers on your Zalo Official Account automatically: n8n receives messages through the Zalo OA webhook, lets AI answer from your internal documents, then hands off to a person when unsure. This follows Zalo's policy, unlike automating a personal Zalo account, which breaks the terms of service.
Zalo OA vs. a personal Zalo account
A Zalo Official Account (Zalo OA) is Zalo's dedicated channel for businesses and household businesses: once verified with a business licence, an OA unlocks Messaging, Chatbot, and Broadcast features plus the official API needed for automated replies. A personal Zalo account has none of that — Zalo does not offer an official bulk-messaging or auto-reply feature for personal accounts.
Say this plainly so you do not waste money: any tool advertised as 'auto-reply, bulk messaging for personal Zalo' is a third-party app faking human behaviour. Under Zalo's community policy, using software to automatically send messages or add friends is a violation of its terms of service, and can get the account suspended or permanently locked — along with the entire customer list built on it.
So the mandatory starting point for a chatbot that replies to customers reliably and within the rules is a verified Zalo OA, not a personal account, no matter how large its existing friend list is.
What the Zalo OA API allows, and for how long
Before building a chatbot, you need to understand three limits of Zalo OA — all worth re-checking at oa.zalo.me or developers.zalo.me at the time of building, since Zalo can adjust this policy.
First, an OA must be verified (by submitting a business licence or household-business registration certificate) before Messaging and Chatbot are unlocked; an unverified OA can only run ads and cannot send messages through the API.
Second, replies to customers are called consultation messages, and they can only be sent within a window counted from the customer's last interaction — under the current policy, the OpenAPI window is 7 days, while sending manually from the OA admin page can reach up to 365 days. Within the first 48 hours after a customer messages, an OA gets 8 free consultation messages; once that quota or the 48-hour window is used up, each further message is billed according to Zalo's published fee schedule.
Third, ZNS (Zalo Notification Service) is a different message type entirely: it uses a template Zalo has pre-approved, and it can reach any phone number on Zalo even if that person has never followed the OA — commonly used for order confirmations, appointment reminders, and transaction notices. ZNS is always billed per message, with no free quota like consultation messages, and it cannot replace an open, back-and-forth conversation with a customer. Since 01/01/2026, Zalo has grouped ZNS together with UID Transaction/Communication messages under one umbrella name, ZBS Template Message, but phone-number-based sending and billing (the old ZNS) work the same as before — check the latest documentation at oa.zalo.me if you see this new name.
| Message type | When to use it | Cost (re-check before building) |
|---|---|---|
| Consultation message — first 48 hours | First 8 messages free after a customer just messaged; the quota resets each time the customer interacts again | Free within the quota |
| Consultation message — beyond the free quota | Continue replying within the allowed window (OpenAPI up to 7 days, OA Manager up to 365 days from the last interaction) | Billed per message, per Zalo's fee schedule at the time of sending |
| ZNS — pre-approved template | Order confirmations, appointment reminders, transaction notices to any phone number on Zalo, including non-followers | Always billed per message; the template must be approved by Zalo before use |
The chatbot architecture: Zalo OA running on n8n
When a customer messages your Zalo OA, Zalo sends that event to the Webhook address configured in the OA admin's Developer section — that is n8n's entry point. From there, the flow runs in five steps:
- OA Webhook — n8n receives the new message along with the sender's information
- Intent classification — figure out which category the question falls into (pricing, booking, complaint, general question)
- AI/rule reply — a common question with a ready-made answer gets a rule-based reply immediately; a more complex one goes to AI, which reads the internal documents to draft a reply
- Send the reply — n8n calls the Zalo OA API back to reply to the right person, in the right conversation
- Hand off & log — for unclear or sensitive questions, alert a staff member; every conversation is logged to Google Sheets or a CRM for tracking
Keeping AI answers grounded, not made up
The difference between a chatbot that helps and one that costs you customers comes down to whether the AI makes things up. The right approach is to load your business's real internal documents — price lists, warranty policy, FAQs, product descriptions — into a single data source, then let AI only search and answer from that source (an approach called RAG — grounded answers, not invented ones).
A question outside the scope of the loaded documents should make the AI say it is not sure and hand off to a person, instead of guessing and promising something the business cannot deliver. This is the same mechanism AdSys uses for its website reply assistant — reusable for the Zalo OA channel too, since it is the same underlying data source, just a different channel for sending and receiving.
When the bot should answer, and when to hand off
Do not let AI decide every situation on its own. Set clear guardrails from the start:
- The question matches the loaded data with high confidence — the bot replies immediately
- Questions about order cancellations, refunds, complaints, or sensitive information — hand off to a person right away, never let the bot handle these
- An ambiguous question, or one AI cannot find matching data for — reply 'let me check and get back to you' and hand off
- Log every handed-off question in a separate list, to add to the AI's documents every week or month
Limits and cost components to plan for
A Zalo OA chatbot is not a single line item but the sum of several smaller components, each of which scales with actual usage — so do not wait for one fixed number; size it to your own customer volume instead.
| Cost component | Why it is needed | Note |
|---|---|---|
| Zalo OA verification | Unlocks Messaging, Chatbot, Broadcast | Requires a business/household-business licence; Zalo reviews the submission |
| Consultation messages beyond the free quota | Replying to customers once the 8 free messages in 48 hours are used up | Billed per extra message, see the limits table above |
| ZNS (if used) | Order confirmations, reminders for customers who have not followed the OA | Only use when truly needed, since it is always billed per message |
| n8n infrastructure | Runs the webhook, the processing flow, and conversation logging 24/7 | Self-hosted on a VPS or run on n8n cloud |
| AI model API calls | The AI reads internal documents and drafts replies | Billed by actual monthly question volume, not a fixed amount |
| Build and maintenance work | Wiring the webhook, writing the flow, updating documents regularly | DIY costs learning hours; hiring it out has an upfront build cost |
A step-by-step rollout checklist
A sensible order to follow, so you do not build the flow only to discover missing data or missing permissions afterward:
- Create and verify a Zalo OA under the business name, with the business licence ready beforehand
- List out every question customers ask most often and turn it into a standard document for AI to learn from
- Configure the Zalo OA Webhook to point at n8n, and confirm test messages are received
- Build the intent-classification flow and rule-based replies for simple, frequently repeated questions
- Connect AI reading the internal documents for more complex questions, with clear handoff guardrails
- Connect conversation logging to Google Sheets or your existing CRM
- Run an internal test before announcing it to customers, and fix any wrong replies
- Hand it over, and track the hand-off rate to keep adding to the documents regularly
