Actions25
消息推送 → 发送应用消息
AI-generatedSummary
Send an application message through Wechat Work to specified users, departments, or tags using various message types such as text, image, voice, video, file, text card, news, markdown, mini program notice, or template card.
Inputs
- msgtype (required) — Type of message to send, e.g., text, image, voice, video, file, textcard, news, mpnews, markdown, miniprogram_notice, or template_card.
- agentid (required) — ID of the enterprise application sending the message, obtainable from the app's settings page.
- touser — Member user IDs to receive the message; multiple IDs separated by '|'. Use '@all' to send to all members of the app.
- toparty — Department IDs to receive the message; multiple IDs separated by '|'. Ignored if 'touser' is '@all'.
- totag — Tag IDs to receive the message; multiple IDs separated by '|'. Ignored if 'touser' is '@all'.
- content (required) — Text content for text or markdown message types, limited to 2048 bytes; supports ID translation.
- media_id (required) — Media file ID for image, voice, file message types obtained by uploading temporary media.
- video (required) — Video data collection including media_id, title (up to 128 bytes), and description (up to 512 bytes) for video message type.
- textcard (required) — Collection including title (up to 128 characters), description (up to 512 characters), URL (with http/https), and optional button text for text card message type.
- articles (required) — Fixed collection of 1 to 8 articles for news or mpnews message types, each with fields like title, description, URL, picurl, appid, and pagepath depending on message type.
- miniprogram_notice (required) — JSON object containing mini program notification message data as per Wechat Work API specification.
- template_card (required) — JSON object containing template card message data as per Wechat Work API specification.
- safe — Boolean to mark message as confidential; when true, disables sharing and shows watermark.
- enable_id_trans — Boolean to enable ID translation in the message.
- enable_duplicate_check — Boolean to enable duplicate message check to prevent sending repeated messages.
- duplicate_check_interval — Time interval in seconds for duplicate message checking, maximum 4 hours.
Output shape
a single record containing the Wechat Work API response JSON indicating success or error details
The operation returns the JSON response from the Wechat Work API for sending application messages, including error codes and messages if applicable.