企业微信(WeCom)-连接微信 icon

企业微信(WeCom)-连接微信

企业微信连接微信功能 - 微信客服、客户联系、家校应用、政民沟通

Actions172

微信客服 → [会话与消息] 发送事件响应消息

AI-generated

Summary

Sends a WeCom customer-service event response using the Code supplied with an event callback. Choose a text message or a menu message; the callback Code may be single-use and time-limited, so send the response promptly.

Inputs

  • code (required) — Event response Code from a WeCom event push, such as a conversation-entry event.
  • msgid — Optional message ID, up to 32 bytes; supports digits, letters, underscores, and hyphens.
  • msgtype (required) — Choose text or menu. Text requires message content; menu accepts optional heading, up to 10 menu items, and optional closing text, with at least one of those menu components filled.
  • text_content (required) — For text messages, the content to send, limited to 2048 bytes.
  • msgmenu_head_content — For menu messages, optional introductory text, up to 1024 bytes.
  • msgmenu_list — For menu messages, up to 10 items. Each has required display text and a type: click, URL link, mini-program, or plain text. Type-specific fields include the click reply ID, URL, mini-program AppID and page path, or whether a text item is followed by a newline.
  • msgmenu_tail_content — For menu messages, optional closing text, up to 1024 bytes.

Output shape

A single response item containing the WeCom API result.

The request is sent once for each input item. The event Code is subject to WeCom's scenario, conversation-state, and validity limits; Codes from event callbacks can only be used once, and welcome or closing message Codes are usually valid for about 20 seconds.

Links

Discussion