企业微信(WeCom)-基础 icon

企业微信(WeCom)-基础

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

Actions248

应用消息 → [卡片消息] 发送任务卡片消息

AI-generated

Summary

Sends interactive task card messages to WeCom users with clickable buttons, supporting multiple recipient types and optional ID translation.

Inputs

  • taskcard_input_mode (required) — Select input method: 'form' for UI fields or '' for raw interactive_taskcard object.
  • title (required) — Card title (max 128 bytes). Supports ID translation.
  • description — Card description (max 512 bytes). Supports ID translation.
  • url — Clickable jump URL (max 2048 bytes, requires http/https).
  • task_id (required) — Unique task ID for the card (max 128 bytes, alphanumeric + _-@).
  • buttons (required) — Button list (1-2 buttons). Each button has a required key and name, plus optional style (bold/color).
  • taskcard_ — Full JSON object for interactive_taskcard when input mode is ''.
  • recipientType — Recipient scope: 'all', 'manual', 'mixed', 'tags', 'departments', or 'users'.
  • touser — Member IDs (max 1000) when recipientType is 'users' or 'mixed'.
  • toparty — Department IDs (max 100) when recipientType is 'departments' or 'mixed'.
  • totag — Tag IDs (max 100) when recipientType is 'tags' or 'mixed'.
  • touser_manual — Manual member IDs (comma or | separated, max 1000) when recipientType is 'manual'.
  • toparty_manual — Manual department IDs (comma or | separated, max 100) when recipientType is 'manual'.
  • totag_manual — Manual tag IDs (comma or | separated, max 100) when recipientType is 'manual'.
  • enable_id_trans — Enable ID translation to @mentions in message text.
  • enable_duplicate_check — Enable duplicate message check (0=off, 1=on, default 0).
  • duplicate_check_interval — Duplicate check interval in seconds (0-14400, default 1800).

Output shape

Success/failure status for each input item.

Returns the WeCom API response (success/error) for each message item sent.

Examples

Example 1: Send a task card to a specific department with an 'Approve' button.

recipientType = departments, toparty = 1, title = 'Pending Approval', task_id = 'task_001', buttons = [{key: 'approve', name: 'Approve'}]

Example 2: Send a card to a list of users using manual IDs with ID translation enabled.

recipientType = manual, touser_manual = 'user001,user002', enable_id_trans = true

Example 3: Send a complex interactive card via raw JSON to a tag group.

recipientType = tags, totag = 5, taskcard_input_mode = , taskcard_ = {...}

Links

Discussion