配置 OpenClaw 与钉钉机器人连接,支持 AI Card 流式响应和会话管理。
bash
openclaw plugins install @dingtalk-real-ai/dingtalk-connector
⚠️ 应用必须发布才能正常接收消息
使用命令行配置:
bash
openclaw channels add
选择 DingTalk,输入 AppKey 和 AppSecret。
或手动编辑 ~/.openclaw/openclaw.json:
json5
{
"channels": {
"dingtalk-connector": {
"enabled": true,
"clientId": "你的AppKey",
"clientSecret": "你的AppSecret"
}
}
}
bash
openclaw gateway restart
openclaw status
确认 DingTalk 状态为 ON / OK。
bash
openclaw logs --follow
检查日志确认:
错误信息: Cannot find module '.../plugin-sdk/root-alias.cjs/channel-runtime'
原因:OpenClaw 版本过低
解决:
bash
npm install -g openclaw@latest
openclaw gateway restart
原因解决方案应用未发布发布应用凭证错误检查 AppKey/AppSecret非 Stream 模式确认机器人配置为 Stream 模式IP 白名单限制检查应用是否设置了 IP 白名单
bash
openclaw gateway stop
openclaw gateway start
json5
{
"channels": {
"dingtalk-connector": {
"enabled": true,
"clientId": "AppKey",
"clientSecret": "AppSecret",
"asyncMode": true,
"ackText": "收到,处理中..."
}
}
}
json5
{
"channels": {
"dingtalk-connector": {
"enabled": true,
"clientId": "AppKey",
"clientSecret": "AppSecret",
"separateSessionByConversation": true,
"groupSessionScope": "group"
}
}
}