๐ฌ WeCom Integration
๐ค Who it's for: Companies using WeCom (Enterprise WeChat)
โฑ๏ธ Read time: ~5 minutes
๐ก In one line: Turn YingClaw into an intelligent employee inside WeCom โ always online, highly collaborative.
Connect YingClaw to WeCom (Enterprise WeChat) via WebSocket long-lived connection for real-time enterprise messaging.
Overviewโ
YingClaw uses WeCom's Bot WebSocket protocol to establish a persistent connection, supporting text, image, and voice message handling with heartbeat keep-alive and automatic reconnection.
| Scenario | Description |
|---|---|
| ๐ผ Enterprise Assistant | Employees chat directly with AI in WeCom |
| ๐ Business Queries | Query CRM, orders, data reports |
| ๐ข Notifications | System alerts and scheduled reports pushed to WeCom |
Setupโ
1. Get WeCom Bot Credentialsโ
Create a Bot application in the WeCom admin console to get:
- Bot ID: The Bot's unique identifier
- Secret: The Bot's secret key
2. Configure in YingClawโ
Log into the YingClaw Web Console, go to "Channels", enable WeCom:
| Parameter | Description |
|---|---|
bot_id | WeCom Bot ID |
secret | WeCom Bot Secret |
websocket_url | WebSocket endpoint, default wss://openws.work.weixin.qq.com |
allowed_users | Employee allowlist, * means all employees |
3. Start the Channelโ
After saving, YingClaw automatically establishes the WebSocket connection. The system will:
- Send periodic heartbeat pings to maintain the connection
- Auto-reconnect on disconnection
- Receive and reply to messages in real time
Message Interactionโ
Private Chatโ
Employees send messages directly to the WeCom Bot, supporting:
- ๐ฌ Intelligent Q&A and business consulting
- ๐ Sales data queries (CRM integration)
- ๐ Document generation and editing
- โฐ Schedule and task management
Group Chatโ
After adding the Bot to a WeCom group, it can receive messages and push notifications and reports.
Message Type Supportโ
| Type | Send | Receive |
|---|---|---|
| Text | โ | โ |
| Image | โ | โ |
| Voice | โ | โ |
User Allowlistโ
channels:
wecom:
allowed_users:
- "ZhangSan" # Only specific employees
# - "*" # Allow all employees
Notesโ
- WebSocket connection requires network access to
openws.work.weixin.qq.com - Voice messages can only be received, not sent
- Heartbeat mechanism maintains the connection automatically
- Use a dedicated WeCom app separate from other business applications
Next Stepsโ
- ๐ฌ Learn about ๐ฌ WeChat Integration
- ๐ Set up ๐ Feishu Integration
- ๐ Back to Documentation