OpenClaw DingTalk Channel
Connect OpenClaw to DingTalk (钉钉) — China's leading enterprise messaging platform by Alibaba — using a community plugin. This integration uses DingTalk's Stream mode (WebSocket long connection), so no public IP or domain is required. It supports direct messages, group chats, text/image/audio/video/file messages, and AI Card streaming replies. Install the plugin, create a DingTalk internal app, enter your credentials, and you're live.
DingTalk Supported Features
Text Messages
Supported
Media & Files
Supported
Reactions
Not Supported
Threads
Not Supported
Voice Messages
Supported
Group Chat
Supported
DingTalk Prerequisites
- Admin or developer access to a DingTalk organization
- DingTalk plugin installed: openclaw plugins install @soimy/dingtalk
- OpenClaw Gateway running and configured
- Node.js 18+ installed on your server
DingTalk Quick Setup
Install the DingTalk plugin
Run 'openclaw plugins install @soimy/dingtalk' in your terminal to install the community DingTalk plugin. If you need AI Card streaming replies and multi-agent routing, you can use '@dingtalk-real-ai/dingtalk-connector' instead.
Create a DingTalk internal app
Log in to the DingTalk Open Platform (open-dev.dingtalk.com) and create an internal enterprise app. Go to the Credentials page to copy your ClientID (AppKey, format: dingXXX) and ClientSecret (AppSecret). Under App Capabilities, add the Bot capability and set the message receiving mode to Stream mode.
Configure permissions and publish
In Permission Management, grant the required permissions: Card.Instance.Write, Card.Streaming.Write, bot message sending, media file upload/download, etc. Once configured, publish the app and wait for admin approval.
Configure OpenClaw and test
Add the DingTalk channel configuration to ~/.openclaw/openclaw.json with your clientId and clientSecret. Run 'openclaw gateway restart' to restart the Gateway, then send a message to your bot in DingTalk to verify everything works.
DingTalk Configuration Example
{
"channels": {
"dingtalk": {
"enabled": true,
"clientId": "dingXXXXXX",
"clientSecret": "your-app-secret",
"robotCode": "dingXXXXXX",
"corpId": "dingXXXXXX",
"dmPolicy": "open",
"groupPolicy": "open",
"messageType": "markdown"
}
}
}DingTalk Integration Guide
Architecture Overview
Plugin Selection
# Install @soimy version (recommended)
openclaw plugins install @soimy/dingtalk
# Or install @dingtalk-real-ai version
openclaw plugins install @dingtalk-real-ai/dingtalk-connectorDingTalk App Creation & Credentials
# Via environment variables
export DINGTALK_CLIENT_ID="dingXXXXXX"
export DINGTALK_CLIENT_SECRET="your_app_secret"
# Or via CLI
openclaw channels addDM and Group Chat Policies
{
"channels": {
"dingtalk": {
"dmPolicy": "open",
"groupPolicy": "open"
}
}
}Reply Formats & AI Card Streaming
{
"channels": {
"dingtalk": {
"messageType": "markdown",
"streaming": true
}
}
}Message Types & Media Support
Multi-Agent Routing
{
"bindings": [
{ "agentId": "main", "match": { "channel": "dingtalk", "peer": { "kind": "direct" } } },
{ "agentId": "tech-support", "match": { "channel": "dingtalk", "peer": { "kind": "group" } } }
]
}Useful Commands
DingTalk Configuration Reference
| Key | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | true | Enable or disable the DingTalk channel |
| clientId | string | "" | DingTalk app ClientID (AppKey), format: dingXXX, from the DingTalk Open Platform |
| clientSecret | string | "" | DingTalk app ClientSecret (AppSecret), from the DingTalk Open Platform |
| robotCode | string | "" | Unique identifier for the bot, from the Bot Configuration page on the DingTalk Open Platform |
| corpId | string | "" | Organization's CorpId, format: dingXXX, from the DingTalk admin console |
| agentId | string | "" | Application AgentId, from the DingTalk Open Platform |
| dmPolicy | string | "open" | Direct message policy. Options: open (anyone can DM), disabled (DMs turned off) |
| groupPolicy | string | "open" | Group chat policy. Options: open (respond when @mentioned), disabled (ignore all group messages) |
| messageType | string | "markdown" | Reply message format. Options: text (plain text), markdown, card (AI Card) |
| streaming | boolean | true | Enable AI Card streaming replies (typewriter effect) |
| debug | boolean | false | Enable debug mode for detailed connection and message logs |
Enable or disable the DingTalk channel
DingTalk app ClientID (AppKey), format: dingXXX, from the DingTalk Open Platform
DingTalk app ClientSecret (AppSecret), from the DingTalk Open Platform
Unique identifier for the bot, from the Bot Configuration page on the DingTalk Open Platform
Organization's CorpId, format: dingXXX, from the DingTalk admin console
Application AgentId, from the DingTalk Open Platform
Direct message policy. Options: open (anyone can DM), disabled (DMs turned off)
Group chat policy. Options: open (respond when @mentioned), disabled (ignore all group messages)
Reply message format. Options: text (plain text), markdown, card (AI Card)
Enable AI Card streaming replies (typewriter effect)
Enable debug mode for detailed connection and message logs
DingTalk Frequently Asked Questions
DingTalk Troubleshooting
The app may not be published, Stream mode may not be enabled, ClientID or ClientSecret may be incorrect, or the plugin may not be installed properly.
Compatibility issues after an OpenClaw version upgrade, or the AI model API key is not configured.
Network instability or known DingTalk Stream mode message loss issues.
Group file and DingTalk Drive APIs may require enterprise verification. Unverified organizations may not have access to these features.
Missing Card-related permissions, or messageType configuration is incorrect.