Zalo Tương Tác icon

Zalo Tương Tác

Tương tác Zalo: tin nhắn, bạn bè, nhóm, tài khoản và custom API qua zca-js

Message → Gửi tin nhắn

AI-generated

Summary

Send a text message optionally with attachments to a user or group thread on Zalo, supporting advanced features like message formatting, replying (quoting), and batch sending to multiple groups with control over targeted groups and error handling.

Inputs

  • Thread Type (required) — Specify the type of thread to send the message to: User or Group.
  • Group Target — When sending to groups, select the targeting mode such as a single group, selected groups, all except certain groups, or only managed groups (where you have admin roles).
  • Thread ID (required) — The ID of the user or group thread as a string; for single targets when group targeting mode is 'single' or for users.
  • Group IDs (required) — A list of group thread IDs to send to when 'Selected Groups' targeting mode is used; multiple IDs separated by new lines or commas.
  • Only Admin / Deputy In List — If enabled when using 'Selected Groups', restricts sending only to groups where you have admin/deputy roles.
  • Only Admin / Deputy Groups — When excluding groups, restricts sending only to groups you manage (admin, deputy, or creator).
  • Exclude Group IDs — Groups to exclude from sending when using 'All Groups Except' or 'Managed Groups' targeting modes.
  • On Group Send Error — Define the error handling behavior on sending failure to a group: skip and continue sending to others or stop the workflow.
  • Delay Between Groups (ms) — Delay in milliseconds between sending messages to each group to reduce rate-limit errors.
  • Message — Text content of the message to send; used as caption when sending media attachments.
  • Text Formatting (RTF) — Enable rich text formatting for the message (such as bold, color, size).
  • Style Input Mode — Choose between UI fields for styling or raw JSON/RTF parameters for advanced formatting.
  • Text Styles — Formatted styles specifying start position, length, and formatting options (bold, italic, colors, lists, indent, etc.) when UI mode is used.
  • Styles JSON — Raw JSON array format defining text style runs for the message when JSON mode is chosen.
  • Reply To Message — Enable replying (quoting) a specific existing message in the thread.
  • Quote Source — Select source for the quote metadata — either from the incoming trigger data or manual input.
  • Quote Message — Manually specify detailed quote fields such as message ID, sender ID, content, timestamp, TTL, and extended properties.
  • Attachments — Add one or more attachments by specifying public URLs of images or files to send with the message.
  • Image / File URLs — A list of URLs (comma or newline separated) for media attachments; required when sending media content.
  • Urgency — Set message urgency level: Default, Important, or Urgent.
  • Mentions — Specify user mentions in the text by providing user IDs and the position and length of the mention in the message text.

Output shape

a single record containing the result status and detailed info about sent messages and any errors encountered

Supports sending to multiple groups with configurable error handling and delay; message formatting is respected if enabled; replying functionality supports quoting a previous message; media attachments are handled with appropriate upload or linking logic.

Examples

Example 1: Send a simple text message to a single user thread

Set Thread Type to User, provide Thread ID as the target user ID, enter the message text, and execute.

Example 2: Send a formatted text and image message to multiple managed groups

Set Thread Type to Group, Group Target to Managed Groups, provide any Group IDs to exclude, enable text styles with UI fields or JSON, add image URLs as attachments, and configure delay and error handling as needed.

Links

Discussion