钉钉企业内部机器人渠道快速对接。Use when: 用户需要对接钉钉渠道、配置钉钉 Stream 模式、排查钉钉消息问题。NOT for: 飞书/Lark、企业微信等其他平台。
钉钉企业内部机器人渠道快速对接指南。
✅ 使用此技能的场景:
❌ 不要使用的场景:
确保已准备:
国内网络环境(推荐使用镜像):
powershell
$env:NPMCONFIGREGISTRY=https://registry.npmmirror.com
openclaw plugins install @soimy/dingtalk
国际网络:
bash
openclaw plugins install @soimy/dingtalk
如需代理:
powershell
$env:HTTP_PROXY=http://127.0.0.1:7897
$env:HTTPS_PROXY=http://127.0.0.1:7897
openclaw plugins install @soimy/dingtalk
编辑 ~/.openclaw/openclaw.json,添加插件到白名单:
json
{
plugins: {
enabled: true,
allow: [dingtalk]
}
}
如果已有其他插件,添加到数组中:
json
{
plugins: {
allow: [telegram, discord, dingtalk]
}
}
方式一:交互式配置(推荐)
bash
openclaw configure --section channels
按提示操作:
方式二:手动编辑配置文件
编辑 ~/.openclaw/openclaw.json,添加 channel 配置:
json
{
channels: [
{
id: dingtalk,
plugin: dingtalk,
enabled: true,
clientId: yourclientid,
clientSecret: yourclientsecret,
dm: open,
group: open
}
]
}
完整配置示例:
json
{
id: dingtalk,
plugin: dingtalk,
enabled: true,
clientId: ding3ti4ahg82dsfkwld,
clientSecret: FrpMFcI30c0STvaJJWyMSZoyeb2Hkm9YqXY-6mJ0dGwdN8Xux7mgT_Xn7qnpvO-F,
robotCode: yourrobotcode,
corpId: yourcorpid,
agentId: youragentid,
aiCard: false,
dm: open,
group: open
}
bash
openclaw gateway restart
| 参数 | 必需 | 说明 | 默认值 |
|---|---|---|---|
| clientId | ✅ | 钉钉 App Key | - |
| clientSecret |
测试连接:
bash
在钉钉中给机器人发送消息,应该能收到回复。
如果安装停在 Installing plugin dependencies...:
bash
cd ~/.openclaw/extensions/dingtalk
rm -rf node_modules package-lock.json
NPMCONFIGREGISTRY=https://registry.npmmirror.com npm install
openclaw gateway restart
检查清单:
powershell
Plugin not found
Connection failed
Plugin not loaded
如果需要自动化批量部署,可以创建以下 PowerShell 脚本:
auto-setup.ps1:
powershell
param(
[Parameter(Mandatory=$true)]
[string]$ClientId,
[Parameter(Mandatory=$true)]
[string]$ClientSecret,
[string]$RobotCode = ,
[string]$CorpId = ,
[string]$AgentId = ,
[string]$ProxyUrl = http://127.0.0.1:7897,
[string]$NpmRegistry = https://registry.npmmirror.com,
[switch]$UseProxy = $false
)
Write-Host === DingTalk Channel Auto Setup === -ForegroundColor Cyan
$dingtalkConfig = @{
id = dingtalk
plugin = dingtalk
enabled = $true
clientId = $ClientId
clientSecret = $ClientSecret
dm = open
group = open
}
if ($RobotCode) { $dingtalkConfig
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 dingtalk-setup-1776186985 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 dingtalk-setup-1776186985 技能
skillhub install dingtalk-setup-1776186985
文件大小: 4.68 KB | 发布时间: 2026-4-15 10:20