企业微信(WeCom)-基础 icon

企业微信(WeCom)-基础

企业微信基础功能 - 通讯录、应用消息、群聊、消息推送、企业互联、素材、系统、电子发票、第三方应用授权、接口调用许可、收银台、对外收款、小程序对外收款、企业红包/向员工付款、数据与智能专区、会话内容存档、推广二维码、账号ID、安全管理

Actions257

智能机器人回复 → [被动回复] 回复用户消息

AI-generated

Summary

Send a passive reply to a user message received by an intelligent robot in WeCom, supporting various reply types including streaming messages, template cards, or a combination of both within a strict time limit.

Inputs

  • Credentials (required) — Select the 'Message Receive API' credentials matching the intelligent robot trigger to authorize the reply.
  • Reply Type (required) — Choose the type of reply to send: streaming message, template card message, or both combined.
  • Stream ID — For streaming messages, provide a unique id on the first reply; can be omitted for subsequent refresh callbacks.
  • Finish — For streaming messages, specify whether this message ends the stream (true) or continues (false).
  • Content — The main content for streaming messages, supporting markdown, UTF-8 encoded up to 20480 bytes.
  • Image List — For ending streaming messages, optionally include up to 10 images as base64 with md5 verification.
  • Feedback ID — An optional id to track user feedback for the message, triggering callbacks when the user interacts.
  • Template Card Input Mode — Select whether to input template card content via form fields or raw JSON.
  • Template Card JSON — Provide the full JSON representation of the template card message when choosing JSON input mode.
  • Various Template Card Fields — When using form input mode, configure template card details such as card type, titles, images, buttons, selectors, and actions according to the official WeCom template card documentation.
  • Task ID — Optional unique task identifier required if action menus are included on the template card.

Output shape

no body — success/failure only

The operation does not return data; it sends a direct passive reply message to the user via the intelligent robot. The reply must complete within 5 seconds to comply with WeCom's required response time for passive replies.

Examples

Example 1: Reply with a streaming message

Set reply type to 'stream', provide a stream_id and content, optionally mark finish true to end streaming.

Example 2: Reply with a template card message

Set reply type to 'template_card', fill template card details by form or JSON input, optionally track user feedback with feedback_id.

Example 3: Reply with combined streaming message and template card

Set reply type to 'stream_with_template_card', provide streaming content and template card data, control attachment and finish states.

Links

Discussion