Install
openclaw skills install jvs-enterprise-wechat快速配置 OpenClaw 与企业微信 AI Bot 对接,实现无需公网和证书的智能助理接入和消息回复功能。
openclaw skills install jvs-enterprise-wechat一键配置 OpenClaw 与企业微信 AI Bot 的对接
此技能帮助你快速将 OpenClaw 机器人接入企业微信,使用 AI Bot 模式(WebSocket 长连接)。
适用场景:
无需:
npx clawhub@latest install wecom-ai-bot-setup
创建成功后,页面上会显示:
| 字段 | 说明 |
|---|---|
| Bot ID | 机器人唯一标识 |
| Secret | 机器人密钥 |
⚠️ 重要:
如果提示需要开通权限:
⚠️ 注意:
python3 scripts/setup_wecom.py
按提示输入:
openclaw gateway restart
你好如果机器人回复了,说明配置成功!🎉
如果不想用脚本,可以手动编辑配置文件:
~/.openclaw/openclaw.json{
"channels": {
"wecom": {
"enabled": true,
"botId": "你的 Bot ID",
"secret": "你的 Secret",
"model": "保持现有模型配置",
"dmPolicy": "open"
}
}
}
然后重启 Gateway:
openclaw gateway restart
| 参数 | 必填 | 说明 | 默认值 |
|---|---|---|---|
enabled | ✅ | 是否启用通道 | false |
botId | ✅ | 企业微信 Bot ID | - |
secret | ✅ | 企业微信 Bot Secret | - |
model | ✅ | 使用的模型 | 当前模型 |
dmPolicy | ❌ | 直接消息策略 | open |
| 值 | 说明 |
|---|---|
open | 所有用户可以直接发消息(推荐) |
pairing | 需要配对码验证 |
allowlist | 只有白名单用户可以发消息 |
disabled | 禁用直接消息 |
检查日志:
tail -f /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | grep -i wecom
可能原因:
openclaw gateway status解决方法:
解决方法:
model 是否正确/session_status重新安装插件:
openclaw plugins install @wecom/wecom-openclaw-plugin --force
openclaw gateway restart
tail -f /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | grep -i wecom
[wecom] message received from: [用户 ID]
[wecom] processing message: 你好
[wecom] sending reply to: [用户 ID]
[wecom] Reply message sent via WebSocket, reqId: xxx
[wecom] failed to connect: invalid botId
[wecom] authentication failed: wrong secret
保护 Secret
配置访问控制
dmPolicy: "allowlist"allowFrom 白名单监控日志
完成配置后,逐项检查:
openclaw plugins install @wecom/wecom-openclaw-plugin如果遇到无法解决的问题:
收集信息:
提交问题:
版本: 1.0.0
作者: harrybot
许可: MIT-0(免费使用,无需署名)