Overview
This node sends messages to DingTalk robots, supporting both custom and enterprise internal robot types. It is useful for automating notifications or alerts within DingTalk groups or chats. Users can send plain text or markdown-formatted messages, mention specific users, or broadcast to all members.
Practical examples include:
- Sending automated alerts from monitoring systems.
- Posting daily reports or summaries in team chats.
- Broadcasting announcements to all group members.
Properties
| Name | Meaning |
|---|---|
| 类型 (type) | Select the robot type: "自定义机器人" (custom robot with rate limit of 20 calls per minute) or "企业内部机器人" (enterprise internal robot). |
| Webhook | The webhook URL of the DingTalk robot to which the message will be sent. |
| AccessToken | The access token for the enterprise internal robot (required only if type is "企业内部机器人"). |
| Sign | The sign key for the custom robot (required only if type is "自定义机器人"). |
| 是否使用JSON格式数据模式 (enableJsonMode) | Whether to use JSON mode to build the message payload manually. If true, user provides full JSON data. |
| 数据内容 (jsonData) | The JSON object representing the message content when JSON mode is enabled. |
| 是否@所有人 (isAtAll) | Whether to mention all users in the message (only when JSON mode is disabled and message type is text or markdown). |
| 被@人的用户Userid (atUserIds) | Comma-separated list of user IDs to mention in the message (only when JSON mode is disabled, message type is text or markdown, and not mentioning all). |
| 消息类型 (msgtype) | Message type: "Markdown类型" (markdown) or "Text类型" (text), used only when JSON mode is disabled. |
| 消息内容 (content) | Text content of the message (required if msgtype is text and JSON mode is disabled). |
| 消息标题 (title) | Title of the markdown message, shown as preview in chat (required if msgtype is markdown and JSON mode is disabled). |
| Markdown格式的消息 (markdownText) | Markdown formatted message body (required if msgtype is markdown and JSON mode is disabled). |
Output
The node outputs a single JSON object containing the response from the DingTalk API after sending the message. This typically includes status information about the request success or failure.
No binary data output is produced.
Dependencies
- Requires an active DingTalk robot webhook URL.
- For enterprise internal robots, requires an access token.
- For custom robots, requires a signing secret to generate a secure signature.
- Uses HMAC SHA256 hashing for signature generation.
- Requires network access to DingTalk API endpoints.
Troubleshooting
Error:
msgtypeis empty
This error occurs if the message type is not set or cannot be determined. Ensure that either JSON mode is enabled with valid JSON data includingmsgtype, or that the message type property is correctly selected.Signature or Access Token issues
If authentication fails, verify that the correct sign key (for custom robots) or access token (for enterprise robots) is provided.Rate limiting on custom robots
Custom robots have a limit of 20 messages per minute. Exceeding this may cause errors or dropped messages.Invalid webhook URL
Confirm the webhook URL is correct and accessible.Mentioned user IDs invalid
When specifying user IDs to mention, ensure they are valid DingTalk user IDs separated by commas.