Zalo Send Message icon

Zalo Send Message

Gửi tin nhắn qua API Zalo sử dụng kết nối đăng nhập bằng cookie

Overview

This node allows sending messages through the Zalo platform, a popular messaging app. It supports sending text messages to individual users or groups, with options for urgency levels, quoting previous messages, mentioning users, and attaching images via URLs.

Common scenarios include:

  • Automating customer support replies by sending messages to user threads.
  • Broadcasting announcements or updates to group chats.
  • Replying to specific messages by quoting them.
  • Highlighting or notifying specific users in a message using mentions.
  • Sending image attachments alongside text messages.

For example, a business could use this node to automatically send order confirmations to customers or notify a team group about project updates with attached images.

Properties

Name Meaning
Thread ID The ID of the thread (user or group chat) where the message will be sent.
Type The type of the message recipient: 0 for individual user, 1 for group chat.
Message The text content of the message to send.
Urgency The urgency level of the message: Default (0), Important (1), or Urgent (2).
Quote Message Optional quoted message details to reply to a specific message, including Message ID, Sender ID, and Content.
Mentions Optional collection of user mentions within the message, specifying User ID, position, and length of mention.
Attachments One or more image attachments specified by public image URLs to include with the message.

Output

The node outputs an array of JSON objects, each representing the result of sending a message for each input item. Each output object includes:

  • success: Boolean indicating if the message was sent successfully.
  • response: The raw response from the Zalo API.
  • threadId: The ID of the thread where the message was sent.
  • threadType: The type of thread (user or group).
  • messageContent: The content of the sent message, including any quotes, mentions, or attachments.

If attachments are included, the node handles downloading and saving images temporarily during processing.

Dependencies

  • Requires valid Zalo API credentials including authentication cookies and device/user agent info.
  • Uses helper utilities for image downloading and temporary file management.
  • Requires network access to Zalo's API endpoints.
  • Node configuration must include the necessary API key credential for Zalo.

Troubleshooting

  • API Initialization Failure: If the Zalo API client fails to initialize (e.g., invalid or expired credentials), the node throws an error. Ensure that the provided API authentication tokens and cookies are valid and up to date.
  • Invalid Thread ID or Type: Providing incorrect thread IDs or mismatched types (user vs group) may cause message sending failures. Verify thread identifiers before running.
  • Attachment Download Issues: If image URLs are inaccessible or invalid, attachment processing will fail. Confirm that URLs are publicly accessible and correct.
  • Quota or Rate Limits: Frequent or bulk message sending might hit Zalo API rate limits, resulting in errors. Implement retries or delays as needed.
  • Mention Position/Length Errors: Incorrect mention positions or lengths can cause malformed messages. Double-check these values when using mentions.

Links and References

Discussion