
Dingtalk Message
Send DingTalk group webhook, enterprise bot, or work-notification messages with correct payloads for text, Markdown, and ActionCard formats.
Overview
DingTalk Message is an agent skill for the Build phase that documents how to send text, Markdown, and ActionCard messages via DingTalk webhook and related enterprise APIs.
Install
npx skills add https://github.com/breath57/dingtalk-skills --skill dingtalk-messageWhat is this skill?
- Documents group custom Webhook robot POST to oapi.dingtalk.com/robot/send with access_token
- Text, Markdown, and ActionCard JSON shapes with @mention fields (atMobiles, atUserIds, isAtAll)
- Notes webhook rate limit of 20 messages per minute per robot
- Optional sign security mode with timestamp and sign query parameters
- Structured field tables for msgtype, content, title, and ActionCard singleURL patterns
- Custom webhook robots are limited to 20 messages per minute per robot
- Covers three message delivery paths: group webhook, enterprise app robot, and work notifications
Adoption & trust: 1.4k installs on skills.sh; 74 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need reliable DingTalk notification payloads but the three robot/notification paths and JSON schemas are easy to mix up or rate-limit.
Who is it for?
Indie SaaS or internal tools that must notify Chinese teams via DingTalk webhooks or corp bots during build-out.
Skip if: Products with no DingTalk users, or teams that only need Slack/Discord equivalents without CN enterprise messaging.
When should I use this skill?
Implementing or debugging DingTalk outbound messages via webhook or enterprise APIs.
What do I get? / Deliverables
You emit valid DingTalk message JSON with correct msgtype, @ fields, and optional signing so deployments and alerts deliver to the right chat.
- Valid DingTalk API request bodies for chosen msgtype
- Working notification calls with documented @ and signing parameters
Recommended Skills
Journey fit
Canonical shelf is Build integrations because the skill is an API reference for wiring DingTalk messaging into your product or ops scripts. Covers three send paths—custom webhook robots, internal app bots, and work notifications—which are typical third-party integration work during implementation.
How it compares
API payload reference for DingTalk robots—not a hosted MCP server and not a generic SMS provider integration.
Common Questions / FAQ
Who is dingtalk-message for?
Solo builders and small teams integrating DingTalk alerts into backends, CI, or agent automations for groups and work notifications.
When should I use dingtalk-message?
During Build integrations when coding webhook sends, Markdown deploy notices, or ActionCard links; reuse when hardening Operate alerting payloads.
Is dingtalk-message safe to install?
It describes network calls that use secrets and tokens; store credentials safely and review the Security Audits panel on this Prism page before use.
SKILL.md
READMESKILL.md - Dingtalk Message
# 钉钉消息 API 参考 > 本文档覆盖三类消息发送方式:群自定义 Webhook 机器人、企业内部应用机器人、工作通知。 --- ## 一、群自定义 Webhook 机器人 基础地址:群设置中获取的 Webhook URL 认证:无需 accessToken,URL 中自带 `access_token` 参数 限制:每个机器人每分钟最多 20 条消息 --- ### 发送消息 ``` POST https://oapi.dingtalk.com/robot/send?access_token=<WEBHOOK_TOKEN> Content-Type: application/json ``` > 若配置了加签安全模式,还需附加 `×tamp=<ms>&sign=<签名>` --- #### 文本消息 ```json { "msgtype": "text", "text": { "content": "项目 v2.1 已上线,请验收。" }, "at": { "atMobiles": ["138xxxx1234"], "atUserIds": ["user123"], "isAtAll": false } } ``` | 字段 | 类型 | 必填 | 说明 | |---|---|---|---| | `msgtype` | string | ✅ | 固定 `"text"` | | `text.content` | string | ✅ | 消息内容 | | `at.atMobiles` | string[] | ❌ | 按手机号 @ 人 | | `at.atUserIds` | string[] | ❌ | 按 userId @ 人 | | `at.isAtAll` | boolean | ❌ | 是否 @所有人 | 返回示例: ```json { "errcode": 0, "errmsg": "ok" } ``` --- #### Markdown 消息 ```json { "msgtype": "markdown", "markdown": { "title": "部署通知", "text": "## v2.1 部署完成\n\n- **环境**:production\n- **时间**:2026-03-10 15:00\n- **状态**:✅ 成功" }, "at": { "isAtAll": false } } ``` | 字段 | 类型 | 必填 | 说明 | |---|---|---|---| | `markdown.title` | string | ✅ | 推送通知展示标题 | | `markdown.text` | string | ✅ | Markdown 正文 | 支持的 Markdown 语法:标题(`#`~`######`)、加粗、链接、图片、有序/无序列表、引用。 --- #### ActionCard(整体跳转) ```json { "msgtype": "actionCard", "actionCard": { "title": "技术评审邀请", "text": "## 技术评审\n\n请参加明天 14:00 的架构评审会议", "singleTitle": "查看详情", "singleURL": "https://example.com/review" } } ``` | 字段 | 类型 | 必填 | 说明 | |---|---|---|---| | `actionCard.title` | string | ✅ | 消息标题 | | `actionCard.text` | string | ✅ | Markdown 正文 | | `actionCard.singleTitle` | string | ✅ | 单按钮文字 | | `actionCard.singleURL` | string | ✅ | 按钮跳转链接 | --- #### ActionCard(多按钮) ```json { "msgtype": "actionCard", "actionCard": { "title": "选择操作", "text": "## 审批请求\n\n张三提交了报销申请", "btnOrientation": "0", "btns": [ { "title": "同意", "actionURL": "https://example.com/approve" }, { "title": "拒绝", "actionURL": "https://example.com/reject" } ] } } ``` | 字段 | 类型 | 必填 | 说明 | |---|---|---|---| | `actionCard.btnOrientation` | string | ❌ | `"0"` 竖排(默认)、`"1"` 横排 | | `actionCard.btns` | array | ✅ | 按钮列表 | | `btns[].title` | string | ✅ | 按钮文字 | | `btns[].actionURL` | string | ✅ | 按钮跳转链接 | --- #### Link 消息 ```json { "msgtype": "link", "link": { "title": "版本发布公告", "text": "v2.1 正式发布,包含性能优化和安全修复。", "messageUrl": "https://example.com/release", "picUrl": "https://example.com/logo.png" } } ``` | 字段 | 类型 | 必填 | 说明 | |---|---|---|---| | `link.title` | string | ✅ | 消息标题 | | `link.text` | string | ✅ | 消息摘要 | | `link.messageUrl` | string | ✅ | 点击跳转链接 | | `link.picUrl` | string | ❌ | 缩略图 URL | --- #### FeedCard 消息 ```json { "msgtype": "feedCard", "feedCard": { "links": [ { "title": "需求评审会议纪要", "messageURL": "https://example.com/doc/1", "picURL": "https://example.com/img1.png" }, { "title": "技术方案设计文档", "messageURL": "https://example.com/doc/2", "picURL": "https://example.com/img2.png" } ] } } ``` | 字段 | 类型 | 必填 | 说明 | |---|---|---|---| | `feedCard.links` | array | ✅ | FeedCard 链接列表 | | `links[].title` | string | ✅ | 单条标题 | | `links[].messageURL` | string | ✅ | 点击跳转链接 | | `links[].picURL` | string | ❌ | 缩略图 URL | --- ### 加签计算(HMAC-SHA256) 适用于配置了"加签"安全模式的自定义机器人。**开启加签后,所有请求都必须带签名**,否则返回 `310000 sign not match`。 **签名算法:** 1. `timestamp` = 当前毫秒级时间戳 2. `string_to_sign` = `timestamp + "\n" + secret` 3. `sign` = URL-Safe Base64 编码(HMAC-SHA256(`secret`, `string_to_sign`)的二进制结果) **最终请求 URL:** ``` https://oapi.dingtalk.com/robot/send?access_token=<TOKEN>×tamp=<timestamp>&sign=<sign> ``` > timestamp 与钉钉服务器时差不能超过 1 小时,否则签名验证失败。 --- ## 二、企业内部应用机器人 基础地址:`https://api.dingtalk.com/v1.0/robot` 认证:请求头 `x-acs-dingtalk-access-token: <accessToken>` `robotCode` 等于应用的 `appKey`(完全一致)。 #### 钉钉身份标识体系 钉钉有三种用户 ID,使用场景各不相同: | 标识 | 说明