Wechat Work Node icon

Wechat Work Node

Wechat Work Node

应用群聊 → 发送群聊消息

AI-generated

Summary

Send a message of various supported types to a specified Wechat Work group chat identified by its unique chat ID.

Inputs

  • 群聊ID (required) — The unique identifier of the group chat to which the message will be sent.
  • 消息类型 (required) — The type of message to send, such as text, image, voice, video, file, text card, news, mpnews, or markdown.
  • 消息内容 (required) — The message content for text or markdown message types, limited to 2048 bytes.
  • 媒体文件ID (required) — The media file ID for image, voice, video, or file message types, obtained by uploading temporary media.
  • 视频消息的标题 — Title of the video message, required only when msgtype is video, limited to 128 bytes.
  • 视频消息的描述 — Description of the video message, required only when msgtype is video, limited to 512 bytes.
  • 是否是保密消息 — Flag indicating whether the message is confidential; true enables confidentiality features such as watermarking and sharing restrictions.

Output shape

a JSON object representing the result of the message send operation as returned from the Wechat Work API

The operation sends a POST request to the Wechat Work API endpoint /cgi-bin/appchat/send. It throws an error if the message type is not supported or if the API returns an error code. The response includes details about the success or failure of the message delivery.

Examples

Example 1: Sending a text message to a specific group chat

Set the 群聊ID to the target chat's ID, 消息类型 to 'text', and 消息内容 to the desired text message.

Example 2: Sending a video message to a group chat

Set the 群聊ID, 消息类型 to 'video', specify the 媒体文件ID for the video, and optionally provide 视频消息的标题 and 视频消息的描述.

Links

Discussion