WeCom (企业微信)
OpenClaw WeCom channel plugin. Official Tencent WeCom team integration for enterprise WeChat.
Tags: channel, messaging, enterprise, china
Use Cases
- Enterprise AI assistant for Chinese companies using WeCom as their internal communication platform
- Internal helpdesk bot that answers employee questions directly in WeCom chats
- Proactive notification system that pushes alerts and updates to specific WeCom users or groups
- Team collaboration assistant with streaming responses for longer analytical or creative tasks
- Automated customer service bot in WeCom-connected business group chats
- Document and knowledge retrieval assistant for enterprise knowledge management via WeCom
Tips
- Use the CLI wizard for initial setup: `npx -y @wecom/wecom-openclaw-cli install` — it's the fastest path to a working configuration
- Set dmPolicy to 'pairing' for personal use or 'allowlist' for controlled access — don't leave it as 'open' in production
- No public URL needed — WebSocket connection means this works behind firewalls and NAT without tunnel setup
- Join the WeChat community group (QR code in the GitHub README) for direct support from the WeCom team
- Use `openclaw pairing list wecom` and `openclaw pairing approve wecom <CODE>` for the pairing flow
- Configure per-group member allowlists for groups where only certain members should interact with the bot
- Update via: `openclaw plugins update wecom-openclaw-plugin`
- Check the full integration guide: https://doc.weixin.qq.com/doc/w3_AFYA1wY6ACoCNRxfnyGRJQaSa6jjJ
Known Issues & Gotchas
- No webhook URL needed — WeCom uses WebSocket persistent connections, so no ngrok or tunnel setup required
- The default dmPolicy is 'open' — ALL users can send direct messages without approval. Change to 'pairing' or 'allowlist' for production
- The CLI installer (`npx @wecom/wecom-openclaw-cli install`) is the recommended setup method — it handles both installation and configuration
- If installation fails, try the `--force` flag: `npx -y @wecom/wecom-openclaw-cli install --force`
- Per-group member allowlists (groups.<chatId>.allowFrom) are separate from group allowlists — both must be configured for fine-grained control
- The WebSocket URL defaults to wss://openws.work.weixin.qq.com — only change this if using a custom WeCom deployment
- Thinking placeholder messages are enabled by default (sendThinkingMessage: true) — disable if they clutter conversations
Alternatives
- @icesword760/openclaw-wechat
- Feishu plugins (@openclaw/feishu, @larksuite/openclaw-lark, etc.)
- Slack (built-in)
Community Feedback
A bot plugin powered by WeCom AI Bot WebSocket persistent connections. Supports direct messages & group chats, streaming replies, and proactive messaging.
— GitHub
Use the CLI tool to automatically install the plugin and complete bot configuration in one step.
— GitHub
WeCom plugin from the actual Tencent team — WebSocket means no webhook setup needed. Cleanest Chinese enterprise integration available.
— OpenClaw Community
Frequently Asked Questions
Do I need a public webhook URL for WeCom?
No! Unlike most channel plugins, WeCom uses WebSocket persistent connections. The plugin connects outbound to Tencent's servers, so no public URL, ngrok, or tunnel is needed. This makes it one of the easiest enterprise plugins to deploy behind firewalls.
What's the easiest way to set up the WeCom plugin?
Use the interactive CLI tool: `npx -y @wecom/wecom-openclaw-cli install`. It handles plugin installation, bot configuration, and initial setup in a single guided process. If it fails, add the --force flag.
What's the default DM policy?
The default is 'open' — all WeCom users can message the bot without approval. For production, change to 'pairing' (requires approval per user) or 'allowlist' (restrict to specific user IDs). Don't leave it as 'open' in enterprise environments.
Can the bot proactively message users?
Yes. The plugin supports proactive messaging to specific users or groups. Your OpenClaw agent can send notifications, alerts, and updates without waiting for the user to message first.
How do I restrict which group members can use the bot?
Use per-group member allowlists. Under groups.<chatId>.allowFrom, list the user IDs allowed to interact with the bot in that specific group. Messages from other members are silently ignored. This is separate from the group-level allowlist.
Is WeCom the same as WeChat?
No. WeCom (企业微信) is Tencent's enterprise communication platform — the business version of WeChat. Personal WeChat integration requires the separate @icesword760/openclaw-wechat plugin. WeCom is for corporate environments with admin controls and compliance features.
What happens if the WebSocket connection drops?
The plugin has built-in auto heartbeat keep-alive and reconnection logic with up to 100 reconnect attempts. For extended outages beyond that, the gateway would need a restart to re-establish the connection.
Configuration Examples
Basic WeCom Bot Setup
channels:
wecom:
enabled: true
botId: ${WECOM_BOT_ID}
secret: ${WECOM_BOT_SECRET}WeCom with Pairing DM Policy
channels:
wecom:
enabled: true
botId: ${WECOM_BOT_ID}
secret: ${WECOM_BOT_SECRET}
dmPolicy: pairing
sendThinkingMessage: trueWeCom with DM and Group Allowlists
channels:
wecom:
enabled: true
botId: ${WECOM_BOT_ID}
secret: ${WECOM_BOT_SECRET}
dmPolicy: allowlist
allowFrom:
- user_id_1
- user_id_2
groupPolicy: allowlist
groupAllowFrom:
- group_id_1WeCom with Per-Group Member Restrictions
channels:
wecom:
enabled: true
botId: ${WECOM_BOT_ID}
secret: ${WECOM_BOT_SECRET}
groupPolicy: allowlist
groupAllowFrom:
- group_id_1
groups:
group_id_1:
allowFrom:
- user_id_1
- user_id_2Installation
openclaw plugins install @wecom/wecom-openclaw-plugin