Skill flagged — review recommended

ClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.

企业微信对话配置

v1.0.0

Set 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...

0· 142· 1 versions· 1 current· 1 all-time· Updated 10h ago· MIT-0
bypengtruman@pengtruman922-dotcom

Install

openclaw skills install wecom-setup

WeCom Channel Setup

Connect OpenClaw to WeCom (企业微信) via the official Tencent WebSocket plugin.

Prerequisites

  • OpenClaw >= 2026.2.13
  • A WeCom AI Bot created at WeCom Open Platform
  • Bot API mode: 长连接 (WebSocket long-polling, no domain/IP required)
  • Bot ID and Secret from the bot management page

📖 Full WeCom AI Bot docs: https://open.work.weixin.qq.com/help?doc_id=21657

Setup Steps

1. Install the plugin

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.

2. Configure the channel

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
      }
    }
  }
}

3. Verify the model configuration

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>"
      }
    }
  }
}

4. Restart the gateway

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"}

5. Test

Send a message to the bot in WeCom. It should reply within a few seconds.

Troubleshooting

SymptomCauseFix
billing error — API key has run out of creditsDefault model provider has no balanceChange agents.defaults.model.primary to a funded provider, restart gateway
doctor warning: allowFromdmPolicy: "open" requires allowFrom: ["*"]Add "allowFrom": ["*"] to wecom config
Bot connects but no replyGateway cached old configFull stop + start: openclaw gateway stop, wait 5s, openclaw gateway start
Windows CLI outputs nothingPowerShell encoding issueUse --plain flag or check health via HTTP directly

Access Control Options

SettingValuesDefaultNotes
dmPolicypairing / open / allowlist / disabledopenControls who can DM the bot
allowFromArray of user IDs or ["*"][]Required when dmPolicy is open
groupPolicyopen / allowlist / disabledopenControls group chat access
groupAllowFromArray of group IDs[]Used with groupPolicy: "allowlist"
sendThinkingMessagetrue / falsetrueShow "thinking…" placeholder while processing

Restrict to specific users (DM)

{
  "channels": {
    "wecom": {
      "dmPolicy": "allowlist",
      "allowFrom": ["user_id_1", "user_id_2"]
    }
  }
}

Restrict to specific groups

{
  "channels": {
    "wecom": {
      "groupPolicy": "allowlist",
      "groupAllowFrom": ["group_id_1"]
    }
  }
}

Version tags

latestvk97b4nj4bb87fxs6tgan4cdkd983e0j4