diff --git a/docs/README.md b/docs/README.md index 1e1cde396..5ee8c8184 100644 --- a/docs/README.md +++ b/docs/README.md @@ -53,6 +53,7 @@ Complete guide to using PicoClaw features. - [LINE](user-guide/channels/line.md) - LINE bot setup - [QQ](user-guide/channels/qq.md) - QQ bot setup - [DingTalk](user-guide/channels/dingtalk.md) - DingTalk setup + - [WeCom](user-guide/channels/wecom.md) - WeCom (Enterprise WeChat) - [OneBot](user-guide/channels/onebot.md) - OneBot protocol - [MaixCam](user-guide/channels/maixcam.md) - MaixCam device diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 5e78e4119..6d90c220f 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -38,6 +38,7 @@ - [LINE](user-guide/channels/line.md) - [QQ](user-guide/channels/qq.md) - [DingTalk](user-guide/channels/dingtalk.md) +- [WeCom](user-guide/channels/wecom.md) - [OneBot](user-guide/channels/onebot.md) - [MaixCam](user-guide/channels/maixcam.md) diff --git a/docs/user-guide/channels/README.md b/docs/user-guide/channels/README.md index cf1ce0e62..45a1915c0 100644 --- a/docs/user-guide/channels/README.md +++ b/docs/user-guide/channels/README.md @@ -12,6 +12,7 @@ PicoClaw supports multiple chat platforms, allowing you to interact with your AI | [LINE](line.md) | Medium | Full support, webhooks | | [QQ](qq.md) | Easy | Basic support | | [DingTalk](dingtalk.md) | Medium | Basic support | +| [WeCom](wecom.md) | Medium | Enterprise, bot + app modes | | [WhatsApp](whatsapp.md) | Medium | Requires bridge | | [Feishu/Lark](feishu-lark.md) | Medium | Enterprise features | | [OneBot](onebot.md) | Medium | Universal protocol | @@ -131,6 +132,7 @@ You can enable multiple channels simultaneously: - [LINE Setup](line.md) - [QQ Setup](qq.md) - [DingTalk Setup](dingtalk.md) +- [WeCom Setup](wecom.md) - [WhatsApp Setup](whatsapp.md) - [Feishu/Lark Setup](feishu-lark.md) - [OneBot Setup](onebot.md) diff --git a/docs/wecom-app-configuration-cn.md b/docs/user-guide/channels/wecom-app-cn.md similarity index 100% rename from docs/wecom-app-configuration-cn.md rename to docs/user-guide/channels/wecom-app-cn.md diff --git a/docs/wecom-app-configuration-en.md b/docs/user-guide/channels/wecom-app-en.md similarity index 100% rename from docs/wecom-app-configuration-en.md rename to docs/user-guide/channels/wecom-app-en.md diff --git a/docs/user-guide/channels/wecom.md b/docs/user-guide/channels/wecom.md new file mode 100644 index 000000000..2a5ebacd5 --- /dev/null +++ b/docs/user-guide/channels/wecom.md @@ -0,0 +1,83 @@ +# WeCom (Enterprise WeChat) + +WeCom (企业微信) is a enterprise messaging platform by Tencent. PicoClaw supports two types of WeCom integrations. + +## Integration Types + +| Type | Description | Group Chat | Active Messaging | +|------|-------------|------------|------------------| +| **WeCom Bot** | Group bot (智能机器人) | ✅ | ❌ | +| **WeCom App** | Custom app (自建应用) | ❌ | ✅ | + +### WeCom Bot (Group Bot) + +Simple setup for group chat notifications. The bot can receive and respond to messages in group chats. + +**Quick Setup:** + +1. WeCom Admin Console → Group Chat → Add Group Bot +2. Copy the webhook URL (format: `https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx`) + +**Configuration:** + +```json +{ + "channels": { + "wecom": { + "enabled": true, + "token": "YOUR_TOKEN", + "encoding_aes_key": "YOUR_ENCODING_AES_KEY", + "webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY", + "webhook_host": "0.0.0.0", + "webhook_port": 18793, + "webhook_path": "/webhook/wecom", + "allow_from": [] + } + } +} +``` + +### WeCom App (Custom App) + +Full-featured integration with active messaging capabilities. Can send proactive messages to users. + +**Features:** +- ✅ Receive messages +- ✅ Send messages proactively +- ✅ Private chat support +- ❌ Group chat not supported + +**Detailed Configuration:** + +- **[English Guide](wecom-app-en.md)** +- **[中文指南](wecom-app-cn.md)** + +## Configuration + +### Basic Settings + +| Option | Description | +|--------|-------------| +| `enabled` | Enable/disable the channel | +| `token` | Token for signature verification | +| `encoding_aes_key` | Encryption key (43 characters) | +| `webhook_host` | Host for webhook server | +| `webhook_port` | Port for webhook (default: 18792 for app, 18793 for bot) | +| `webhook_path` | URL path for webhook | +| `allow_from` | User IDs allowed to interact (empty = all) | + +## Troubleshooting + +### Callback URL Verification Failed + +1. Check firewall has webhook port open +2. Verify `token` and `encoding_aes_key` match WeCom console settings +3. Check PicoClaw logs for incoming requests + +### Chinese Message Decryption Failed + +Ensure you're using the latest PicoClaw version - WeCom uses non-standard PKCS7 padding (32-byte blocks). + +## References + +- [WeCom Official Documentation](https://developer.work.weixin.qq.com/)