Appearance
配置
OpenClaw 支持交互式配置和手动配置文件两种方式。推荐优先使用交互式配置。
方式 1:交互式配置
bash
openclaw onboard或者:
bash
openclaw configure --section channels配置流程通常包括:
- 选择
dingtalk - 输入
Client ID - 输入
Client Secret - 视情况补充
Robot Code、Corp ID、Agent ID - 选择消息模式
- 选择私聊与群聊策略
方式 2:手动配置文件
在 ~/.openclaw/openclaw.json 中配置。
最小示例:
json5
{
"plugins": {
"enabled": true,
"allow": ["dingtalk"]
},
"channels": {
"dingtalk": {
"enabled": true,
"clientId": "dingxxxxxx",
"clientSecret": "your-app-secret",
"robotCode": "dingxxxxxx",
"corpId": "dingxxxxxx",
"agentId": "123456789",
"dmPolicy": "open",
"groupPolicy": "open",
"messageType": "markdown"
}
}
}卡片模式示例:
json5
{
"channels": {
"dingtalk": {
"messageType": "card",
"cardTemplateId": "your-template-id.schema",
"cardTemplateKey": "content"
}
}
}手动修改后需要重启:
bash
openclaw gateway restart配置建议
- 大多数场景先从
messageType: "markdown"开始 - 如果需要流式可视化回复,再切到
card - 对高风险投递场景优先使用显式 ID,而不是显示名解析