Overview
This node sends messages to an Enterprise WeChat group via a configured group chatbot webhook. It supports sending either plain text or Markdown formatted messages. The node is useful for automating notifications, alerts, or updates directly into a corporate WeChat group chat.
Typical use cases include:
- Sending system alerts or monitoring notifications to a team chat.
- Broadcasting announcements or status updates in a project group.
- Delivering formatted reports or summaries using Markdown.
Properties
| Name | Meaning |
|---|---|
| 机器人Webhook Key (webhookKey) | The unique webhook key of the Enterprise WeChat group bot, obtained from the bot configuration page. Required to authenticate and send messages. |
| 消息类型 (messageType) | The type of message to send. Options: "文本消息" (text), "Markdown消息" (markdown). |
| 消息内容 (content) | The content of the message to send to the WeChat group. Supports plain text or Markdown depending on message type. |
| @所有人 (mentionedAll) | Whether to mention all members in the group (only effective for text messages). Boolean true/false. |
| @指定用户 (mentionedList) | Comma-separated list of user IDs to mention in the message (only for text messages). |
| @指定手机号 (mentionedMobileList) | Comma-separated list of user phone numbers to mention (only for text messages). |
Output
The node outputs a JSON object with the following structure:
{
"success": true,
"message": "消息发送成功",
"webhookKey": "<used webhook key>",
"messageType": "<sent message type>",
"content": "<sent message content>",
"response": {
"errcode": 0,
"errmsg": "ok"
}
}
success: Indicates if the message was sent successfully.message: A success message string.webhookKey,messageType,content: Echoes back the input parameters used.response: The raw response data from the Enterprise WeChat API, including error code and message.
If an error occurs and the node is set to continue on failure, the output will contain an error field with the error message.
The node does not output binary data.
Dependencies
- Requires access to the Enterprise WeChat group chatbot webhook URL, which includes the webhook key.
- Uses HTTP POST requests to the Enterprise WeChat API endpoint.
- No additional credentials are required beyond the webhook key.
- Requires network connectivity to
https://qyapi.weixin.qq.com.
Troubleshooting
- Missing Webhook Key: If the webhook key is empty, the node throws an error indicating it cannot be empty. Ensure you provide a valid webhook key from your WeChat group bot configuration.
- Empty Message Content: The node requires non-empty message content; otherwise, it throws an error.
- API Errors: If the Enterprise WeChat API returns an error (non-zero error code), the node throws an error with the API's error message and code. Common causes include invalid webhook key or malformed message payload.
- Timeouts: The HTTP request has a 10-second timeout. Network issues may cause timeouts.
- Mentioning Users: The
mentionedListandmentionedMobileListonly work with text messages. Using them with markdown messages has no effect. - @All Mention: The
mentionedAllflag only works with text messages.
To resolve errors:
- Verify the webhook key is correct and active.
- Check message content is properly formatted.
- Confirm user IDs or mobile numbers for mentions are valid.
- Ensure network connectivity to the WeChat API endpoint.
Links and References
- Enterprise WeChat Group Robot API Documentation (official API docs for sending messages via group bots)