Install
openclaw skills install wecom-setupSet up WeCom (企业微信) as a chat channel for OpenClaw using the official Tencent plugin with WebSocket long-polling. Use when user wants to connect WeCom bot, c...
openclaw skills install wecom-setupConnect OpenClaw to WeCom (企业微信) via the official Tencent WebSocket plugin.
📖 Full WeCom AI Bot docs: https://open.work.weixin.qq.com/help?doc_id=21657
openclaw plugins install @wecom/wecom-openclaw-plugin
Wait for installation to complete. A security warning about "Environment variable access combined with network send" is expected — the plugin needs the bot secret to establish WebSocket connections.
Edit ~/.openclaw/openclaw.json. Add wecom under channels:
{
"channels": {
"wecom": {
"enabled": true,
"botId": "<YOUR_BOT_ID>",
"secret": "<YOUR_BOT_SECRET>",
"dmPolicy": "open",
"allowFrom": ["*"],
"groupPolicy": "open"
}
}
}
Also ensure the plugin is allowed and enabled under plugins:
{
"plugins": {
"allow": ["wecom-openclaw-plugin"],
"entries": {
"wecom-openclaw-plugin": {
"enabled": true
}
}
}
}
The WeCom channel uses the global default model (agents.defaults.model.primary). Confirm it points to a provider with sufficient credits:
openclaw models status
If the default model's provider has no balance, update the primary:
{
"agents": {
"defaults": {
"model": {
"primary": "<provider>/<model>"
}
}
}
}
openclaw gateway restart
If the restart exits with code 1 or produces no output (common on Windows), verify health manually:
# PowerShell
Invoke-WebRequest -Uri http://localhost:<port>/health -UseBasicParsing | Select-Object -ExpandProperty Content
# Expected: {"ok":true,"status":"live"}
Send a message to the bot in WeCom. It should reply within a few seconds.
| Symptom | Cause | Fix |
|---|---|---|
billing error — API key has run out of credits | Default model provider has no balance | Change agents.defaults.model.primary to a funded provider, restart gateway |
doctor warning: allowFrom | dmPolicy: "open" requires allowFrom: ["*"] | Add "allowFrom": ["*"] to wecom config |
| Bot connects but no reply | Gateway cached old config | Full stop + start: openclaw gateway stop, wait 5s, openclaw gateway start |
| Windows CLI outputs nothing | PowerShell encoding issue | Use --plain flag or check health via HTTP directly |
| Setting | Values | Default | Notes |
|---|---|---|---|
dmPolicy | pairing / open / allowlist / disabled | open | Controls who can DM the bot |
allowFrom | Array of user IDs or ["*"] | [] | Required when dmPolicy is open |
groupPolicy | open / allowlist / disabled | open | Controls group chat access |
groupAllowFrom | Array of group IDs | [] | Used with groupPolicy: "allowlist" |
sendThinkingMessage | true / false | true | Show "thinking…" placeholder while processing |
{
"channels": {
"wecom": {
"dmPolicy": "allowlist",
"allowFrom": ["user_id_1", "user_id_2"]
}
}
}
{
"channels": {
"wecom": {
"groupPolicy": "allowlist",
"groupAllowFrom": ["group_id_1"]
}
}
}