← Back to PRs

#13291: feat(ddingtalk): add DingTalk(dingtalk) channel extension

by largezhou open 2026-02-10 09:06 View on GitHub →
docs app: macos size: XL
## Summary This PR adds a new channel extension for DingTalk (钉钉), enabling OpenClaw to connect with DingTalk - one of China's leading enterprise communication platforms widely used across businesses and organizations. ## Motivation DingTalk is a dominant enterprise messaging platform in China with hundreds of millions of users. This integration would greatly expand OpenClaw's reach to Chinese enterprise users who rely on DingTalk for daily communication and collaboration. ## Features - WebSocket Stream mode connection with DingTalk Open Platform API (no public IP or domain required) - Support for receiving text, image, audio, video, file, and rich text messages - Support for replying with text (Markdown), image, and file messages - Private chat (direct message) support - Proactive messaging capability via BatchSendOTO API - Interactive onboarding flow for bot configuration - Media upload/download pipeline with graceful degradation (fallback to text + link on failure) - Async non-blocking message processing (immediate SUCCESS reply to DingTalk server, then async handling) - Allowlist-based security for sender validation - OpenClaw command support (`/new`, `/compact`, `/models`, etc.) ## Changes - `extensions/dingtalk/`: Complete DingTalk channel implementation (15 files, ~3,200 lines) - `channel.ts`: Core channel plugin with capabilities declaration, outbound messaging, target resolution - `client.ts`: DingTalk API client (OAuth2 auth, message send/reply, media upload/download) - `handlers.ts`: Strategy-pattern inbound message handlers for 7 message types - `monitor.ts`: Stream long-connection listener with runtime state tracking - `media.ts`: Media download/save/context building pipeline - `onboarding.ts`: Interactive configuration wizard - `accounts.ts`, `types.ts`, `constants.ts`, `logger.ts`, `runtime.ts`: Supporting modules - `src/config/types.channels.ts`: Add `dingtalk` channel type - `src/config/types.dingtalk.ts`: DingTalk configuration schema - `docs/channels/dingtalk.md`: English documentation with step-by-step setup guide - `docs/zh-CN/channels/dingtalk.md`: Chinese documentation - `docs/images/dingtalk/`: 8 screenshots for configuration walkthrough ## Testing - [x] Tested locally on my OpenClaw instance - [x] Ran `pnpm build && pnpm check && pnpm test` - [x] Verified Stream connection, message receiving and replying with real DingTalk bot ## AI Assistance Disclosure Parts of this code were developed with AI assistance (Claude). The code has been: - Fully tested with real DingTalk bot instances - Reviewed and understood by me completely - Iteratively refined based on real-world usage feedback I'm committed to long-term maintenance of this extension and would be happy to address any feedback or requested changes. Thank you for considering this contribution! ## Issue Submitted I have submitted an issue for this feature: [#13858](https://github.com/openclaw/openclaw/issues/13858)

Most Similar PRs