Skip to main content

WeCom Bot

WeCom Bot (智能机器人) is the easier WeCom integration. It supports group chats via webhook.

For the full-featured WeCom App integration (private chat, proactive messaging), see WeCom App.

Setup

1. Create a Bot

  • Go to WeCom Admin Console → Group Chat → Add Group Bot
  • Copy the webhook URL (format: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx)

2. Configure Receive Messages (Optional)

To receive messages from users:

  • Set up a webhook endpoint
  • Configure Token and EncodingAESKey

3. Configure

{
"channels": {
"wecom": {
"enabled": true,
"token": "YOUR_TOKEN",
"encoding_aes_key": "YOUR_43_CHAR_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": [],
"reply_timeout": 5
}
}
}
FieldTypeDescription
tokenstringVerification token
encoding_aes_keystring43-character AES key for message encryption
webhook_urlstringWeCom bot webhook URL for sending messages
webhook_hoststringLocal webhook listen host
webhook_portintLocal webhook listen port (default: 18793)
allow_fromarrayList of allowed user IDs
reply_timeoutintReply timeout in seconds

4. Run

picoclaw gateway