OpenClaw Zalo Channel
Connect OpenClaw to Zalo using the Zalo Bot Platform. This integration lets your AI assistant send and receive messages on Vietnam's most popular messaging app. Set up a bot token, configure your DM policy, and start chatting — with support for both long-polling and webhook delivery modes.
Zalo Supported Features
Text Messages
Supported
Media & Files
Not Supported
Reactions
Not Supported
Threads
Not Supported
Voice Messages
Not Supported
Group Chat
Not Supported
Zalo Prerequisites
- A Zalo account with access to the Zalo Bot Platform (bot.zaloplatforms.com)
- A bot token obtained from the Zalo Bot Platform dashboard
- OpenClaw Gateway running and configured
- For webhook mode: a publicly accessible HTTPS endpoint
Zalo Quick Setup
Create a Zalo bot and get your token
Go to bot.zaloplatforms.com, sign in with your Zalo account, and create a new bot. Copy the bot token (format: 12345689:abc-xyz) from the dashboard.
Add Zalo channel config
Add the Zalo channel configuration to ~/.openclaw/openclaw.json. Set the botToken, dmPolicy (pairing, allowlist, open, or disabled), and optionally configure webhook settings.
Start the Gateway and test
Start the Gateway with 'openclaw start'. The bot will connect via long-polling by default. Send a message to your bot on Zalo to verify the connection works.
Zalo Configuration Example
{
"channels": {
"zalo": {
"enabled": true,
"botToken": "12345689:abc-xyz",
"dmPolicy": "pairing"
}
}
}Zalo Integration Guide
Architecture Overview
Creating Your Zalo Bot
{
"channels": {
"zalo": {
"enabled": true,
"botToken": "12345689:abc-xyz"
}
}
}DM Policies
{
"channels": {
"zalo": {
"dmPolicy": "allowlist",
"allowFrom": ["123456789", "987654321"]
}
}
}Webhook Configuration
{
"channels": {
"zalo": {
"botToken": "12345689:abc-xyz",
"webhookUrl": "https://your-server.com/zalo/webhook",
"webhookSecret": "your-secret-string-8-to-256-chars",
"webhookPath": "/zalo/webhook"
}
}
}Message Handling
Multi-Account Setup
{
"channels": {
"zalo": {
"accounts": {
"support-bot": {
"botToken": "token-for-support-bot",
"dmPolicy": "open"
},
"team-bot": {
"botToken": "token-for-team-bot",
"dmPolicy": "allowlist",
"allowFrom": ["111222333"]
}
}
}
}
}Outbound Messaging
openclaw message send --channel zalo --target 123456789Proxy Configuration
{
"channels": {
"zalo": {
"proxy": "http://proxy.example.com:8080"
}
}
}Zalo Configuration Reference
| Key | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | false | Enable or disable the Zalo channel |
| botToken | string | "" | Bot token from the Zalo Bot Platform (bot.zaloplatforms.com) |
| tokenFile | string | "" | Read the bot token from a file path instead of inline configuration |
| dmPolicy | string | "pairing" | Controls who can DM the bot. Options: pairing, allowlist, open, disabled |
| allowFrom | string[] | [] | Numeric Zalo user IDs allowed to message the bot (when dmPolicy is allowlist) |
| mediaMaxMb | number | 5 | Maximum inbound media file size in megabytes |
| webhookUrl | string | "" | HTTPS URL for webhook mode. When set, long-polling is disabled |
| webhookSecret | string | "" | Secret string (8-256 characters) for webhook verification via X-Bot-Api-Secret-Token header |
| webhookPath | string | "" | Custom webhook path on the Gateway HTTP server |
| proxy | string | "" | Proxy URL for outbound API requests to Zalo |
| accounts.<id>.botToken | string | "" | Bot token for a specific account in multi-account mode |
| accounts.<id>.dmPolicy | string | "pairing" | DM policy override for a specific account |
| accounts.<id>.webhookUrl | string | "" | Webhook URL override for a specific account |
Enable or disable the Zalo channel
Bot token from the Zalo Bot Platform (bot.zaloplatforms.com)
Read the bot token from a file path instead of inline configuration
Controls who can DM the bot. Options: pairing, allowlist, open, disabled
Numeric Zalo user IDs allowed to message the bot (when dmPolicy is allowlist)
Maximum inbound media file size in megabytes
HTTPS URL for webhook mode. When set, long-polling is disabled
Secret string (8-256 characters) for webhook verification via X-Bot-Api-Secret-Token header
Custom webhook path on the Gateway HTTP server
Proxy URL for outbound API requests to Zalo
Bot token for a specific account in multi-account mode
DM policy override for a specific account
Webhook URL override for a specific account
Zalo Frequently Asked Questions
Zalo Troubleshooting
The bot token may be invalid, expired, or the Gateway is not running. In webhook mode, the HTTPS endpoint may be unreachable.
Long-polling has inherent latency compared to webhook mode. Network instability can also cause message batching.
The dmPolicy may not be set to 'pairing', or the bot is not properly connected to Zalo.
The image file may exceed the mediaMaxMb limit, or the Zalo API may be temporarily unavailable.
The webhookSecret in your configuration doesn't match what Zalo expects, or the endpoint is not returning the correct response.