Channel: Zalo
Zalo is one of Vietnam's largest messaging platforms. The adapter connects your agent as a Zalo Bot to handle messages from Zalo users.
Community adapter
This adapter is maintained by the community: chat-adapter-zalo.
Before you start
- Register a Zalo Bot at developers.zalo.me.
- Copy the Bot Token (format:
12345689:abc-xyz). - Choose a Webhook Secret — any random string for request verification.
- In the Zalo Bot dashboard set the webhook URL (see below) and verify it.
Example prompts
Connect the customer-agent to Zalo.
Add Zalo messaging to my sales agent.
What happens
The widget asks for credentials:
name type CUSTOMER_AGENT_ZALO_BOT_TOKENpassword CUSTOMER_AGENT_ZALO_WEBHOOK_SECRETpassword Shmastra wires the adapter:
tsimport { Agent } from '@mastra/core/agent' import { createZaloAdapter } from 'chat-adapter-zalo' import { createAgentChannels } from '../shmastra' export const customerAgent = new Agent({ id: 'customer-agent', channels: createAgentChannels({ adapters: { zalo: createZaloAdapter(), }, }), })The widget prints the webhook URL to paste into the Zalo Bot dashboard:
{PUBLIC_URL}/api/agents/customer-agent/channels/zalo/webhookSend a message to the Zalo Bot — the agent replies.
Tips
- Webhook verification — Zalo sends a verification request when you first register the URL; the adapter handles it automatically.
- Rich messages — Zalo supports image and file attachments. The agent sees them the same way it would via the chat widget.