快速安装和配置 OpenClaw 钉钉通道,实现钉钉与 OpenClaw 的双向通信。
切勿将真实的 Client ID/Secret 提交到代码仓库! 示例中的凭证均为占位符,请替换为你自己的凭证。
python3 ~/.openclaw/workspace/my-skills/skills/dingtalk-channel-install/scripts/install_dingtalk.py \
--client-id <你的 Client ID> \
--client-secret <你的 Client Secret>
```bash
openclaw plugins install @soimy/dingtalk
```
~/.openclaw/openclaw.json:```json
{
"channels": {
"dingtalk": {
"enabled": true,
"clientId": "<你的 Client ID>",
"clientSecret": "<你的 Client Secret>",
"dmPolicy": "open",
"groupPolicy": "open",
"showThinking": true,
"thinkingMessage": "🤔 思考中,请稍候...",
"debug": false,
"messageType": "markdown",
"allowFrom": ["*"]
}
}
}
```
```bash
openclaw gateway restart
```
| 参数 | 必填 | 说明 |
|---|---|---|
| ------ | ------ | ------ |
--client-id | ✅ | 钉钉应用 Client ID |
--client-secret | ✅ | 钉钉应用 Client Secret |
--robot-code | ❌ | 机器人 Code |
--corp-id | ❌ | 企业 Corp ID |
--agent-id | ❌ | 应用 Agent ID |
--card-template-id | ❌ | 卡片模板 ID(仅 card 模式) |
--card-template-key | ❌ | 卡片模板内容变量(仅 card 模式) |
--message-type | ❌ | 消息类型:markdown/card,默认 markdown |
--skip-restart | ❌ | 跳过 gateway 重启 |
--config-path | ❌ | 配置文件路径,默认 ~/.openclaw/openclaw.json |
python3 ~/.openclaw/workspace/my-skills/skills/dingtalk-channel-install/scripts/install_dingtalk.py \
--client-id <你的 Client ID> \
--client-secret <你的 Client Secret>
python3 ~/.openclaw/workspace/my-skills/skills/dingtalk-channel-install/scripts/install_dingtalk.py \
--client-id <clientId> \
--client-secret <clientSecret> \
--message-type card \
--card-template-id <模板 ID> \
--card-template-key <模板变量>
python3 ~/.openclaw/workspace/my-skills/skills/dingtalk-channel-install/scripts/install_dingtalk.py \
--client-id <clientId> \
--client-secret <clientSecret> \
--corp-id <corpId> \
--agent-id <agentId>
"open" 允许私聊,"restricted" 限制私聊"open" 允许群聊,"restricted" 限制群聊["*"] 表示允许所有"markdown" 或 "card"```bash
openclaw plugins list
```
```bash
openclaw gateway status
```
plugins.entries.dingtalk: plugin dingtalk: duplicate plugin id detected
这是正常警告,不影响使用。如需清理,删除重复的插件目录后重启。
运行 openclaw doctor --fix 自动修复配置问题。
allowFrom 设置是否匹配 dmPolicy/groupPolicy共 1 个版本