Automate Personal Zalo Accounts with OpenClaw
Ever felt stuck trying to automate a chat platform that doesn’t offer an official API? It is a common frustration when you want to connect your personal accounts to your own tools but find the door closed. If you are looking to bring your Zalo personal account into your automation workflow, this experimental integration for OpenClaw is exactly what you need.
Zalo Personal (unofficial)
Section titled “Zalo Personal (unofficial)”This integration is currently experimental. It automates a personal Zalo account using native zca-js right inside OpenClaw.
Warning: This is an unofficial integration. It might lead to account suspension or a ban, so use it at your own risk.
Plugin required
Section titled “Plugin required”Zalo Personal works as a plugin and does not come bundled with the core installation.
- Install via CLI:
openclaw plugins install @openclaw/zalouser - Or from a source checkout:
openclaw plugins install ./path/to/local/zalouser-plugin - Details: Plugins
You won’t need any external zca or openzca CLI binaries for this to work.
Quick setup (beginner)
Section titled “Quick setup (beginner)”- Install the plugin using the commands mentioned above.
- Log in by scanning a QR code on your Gateway machine:
openclaw channels login --channel zalouser- Scan the QR code with your Zalo mobile app.
- Enable the channel in your configuration:
{ channels: { zalouser: { enabled: true, dmPolicy: "pairing", }, },}- Restart the Gateway or finish your setup.
- DM access defaults to pairing. You just need to approve the pairing code when someone first contacts you.
What it is
Section titled “What it is”- This runs entirely in-process using
zca-js. - It uses native event listeners to catch inbound messages.
- It sends replies directly through the JS API for text, media, links, and events.
- It is designed for personal account use cases where the Zalo Bot API is not available.
Naming
Section titled “Naming”The channel ID is zalouser. This makes it explicit that you are automating a personal Zalo user account. We keep the name zalo reserved for a potential official Zalo API integration in the future.
Finding IDs (directory)
Section titled “Finding IDs (directory)”You can use the directory CLI to find peers or groups and their specific IDs:
openclaw directory self --channel zalouseropenclaw directory peers list --channel zalouser --query "name"openclaw directory groups list --channel zalouser --query "work"Limits
Section titled “Limits”- Outbound text is split into chunks of about 2000 characters because of Zalo client limits.
- Streaming is blocked by default.
Access control (DMs)
Section titled “Access control (DMs)”The channels.zalouser.dmPolicy setting supports pairing, allowlist, open, or disabled. It defaults to pairing.
The channels.zalouser.allowFrom field accepts user IDs or names. During setup, the plugin resolves names to IDs using an in-process contact lookup.
You can approve access via:
openclaw pairing list zalouseropenclaw pairing approve zalouser <code>
Group access (optional)
Section titled “Group access (optional)”- By default,
channels.zalouser.groupPolicyis set to"open", so groups are allowed. Usechannels.defaults.groupPolicyif you want to override this default when it is unset. - You can restrict access to an allowlist by setting:
channels.zalouser.groupPolicy = "allowlist"channels.zalouser.groups(keys should be stable group IDs; names are resolved to IDs on startup)channels.zalouser.groupAllowFrom(this controls which senders in allowed groups can trigger the bot)
- To block all groups, use
channels.zalouser.groupPolicy = "disabled". - The configuration wizard can prompt you for group allowlists.
- On startup, OpenClaw resolves group or user names in allowlists to IDs and logs the mapping.
- Group allowlist matching only uses IDs by default. Unresolved names are ignored for authentication unless you enable
channels.zalouser.dangerouslyAllowNameMatching: true. channels.zalouser.dangerouslyAllowNameMatching: trueis a compatibility mode that enables matching by mutable group names.- If
groupAllowFromis not set, the system falls back toallowFromfor group sender checks. - Sender checks apply to normal group messages and control commands like
/newor/reset.
Example:
{ channels: { zalouser: { groupPolicy: "allowlist", groupAllowFrom: ["1471383327500481391"], groups: { "123456789": { allow: true }, "Work Chat": { allow: true }, }, }, },}Group mention gating
Section titled “Group mention gating”channels.zalouser.groups.<group>.requireMentioncontrols if group replies need a mention.- The resolution order is: exact group ID/name, normalized group slug,
*, and then the default (true). - This applies to both allowlisted groups and open group mode.
- Authorized control commands like
/newcan bypass this mention gating. - When a group message is skipped because a mention is required, OpenClaw stores it as pending history and includes it with the next processed group message.
- The group history limit defaults to
messages.groupChat.historyLimit(fallback50). You can override this per account withchannels.zalouser.historyLimit.
Example:
{ channels: { zalouser: { groupPolicy: "allowlist", groups: { "*": { allow: true, requireMention: true }, "Work Chat": { allow: true, requireMention: false }, }, }, },}Multi-account
Section titled “Multi-account”Accounts map to zalouser profiles in the OpenClaw state. Example:
{ channels: { zalouser: { enabled: true, defaultAccount: "default", accounts: { work: { enabled: true, profile: "work" }, }, }, },}Typing, reactions, and delivery acknowledgements
Section titled “Typing, reactions, and delivery acknowledgements”- OpenClaw sends a typing event before dispatching a reply as a best-effort action.
- The message reaction action
reactis supported forzalouserin channel actions.- Use
remove: trueto remove a specific reaction emoji from a message. - Reaction semantics: Reactions
- Use
- For inbound messages that include event metadata, OpenClaw sends delivered acknowledgements and seen receipts.
Troubleshooting
Section titled “Troubleshooting”Login doesn’t stick:
openclaw channels status --probe- Re-login:
openclaw channels logout --channel zalouser && openclaw channels login --channel zalouser
Allowlist/group name didn’t resolve:
- Use numeric IDs in
allowFrom,groupAllowFrom, orgroups. You can also use exact friend or group names.
Upgraded from old CLI-based setup:
- Remove any old external
zcaprocess assumptions. - The channel now runs fully in OpenClaw without any external CLI binaries.
Related
Section titled “Related”- Channels Overview — all supported channels
- Pairing — DM authentication and pairing flow
- Groups — group chat behavior and mention gating
- Channel Routing — session routing for messages
- Security — access model and hardening
Next steps
Section titled “Next steps”- Check out the Pairing guide to manage your DM security.
- Learn more about Group Chat Behavior to fine-tune your bot’s interactions.
Need more help? Ask the AI Setup Assistant.
OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.