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 using its API authenticated by a login cookie. Specifically, for the "Gửi sticker" (Send sticker) operation, it sends a sticker to a specified conversation thread on Zalo, which can be either a personal chat or a group chat.

Common scenarios where this node is useful include:

  • Automating customer engagement by sending stickers as part of interactive conversations.
  • Enhancing chatbot responses with visual/sticker content.
  • Broadcasting fun or branded stickers to groups or individual users.

For example, you could use this node to send a celebratory sticker automatically when a user completes a task or to respond with a specific sticker based on user input in a chat.

Properties

Name Meaning
ID cuộc trò chuyện / Thread ID The unique identifier of the conversation (user or group) where the sticker will be sent.
Loại cuộc trò chuyện The type of conversation:
- Cá nhân (Personal chat)
- Nhóm (Group chat)
Sticker ID The identifier of the sticker to send.

Output

The output JSON object contains:

  • success: Boolean indicating if the sticker was sent successfully.
  • response: The raw response from the Zalo API after sending the sticker.
  • threadId: The ID of the conversation thread where the sticker was sent.
  • stickerId: The ID of the sticker that was sent.
  • stickerObj: The detailed sticker object retrieved from the Zalo API, including fields like id, cateId, and type.

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials authenticated via a login cookie, IMEI, and user agent string.
  • The node uses an external Zalo API client library (zca-js) to interact with Zalo services.
  • Proper configuration of these credentials in n8n is necessary before using the node.
  • No additional environment variables are required beyond the credential setup.

Troubleshooting

  • Zalo API not initialized: This error occurs if the node fails to authenticate with Zalo using the provided credentials. Ensure your cookie, IMEI, and user agent are correct and up to date.
  • Sticker detail is invalid or missing required fields: Happens if the sticker ID provided does not correspond to a valid sticker or the API response lacks expected fields. Verify the sticker ID is correct and exists.
  • Failed to send typing event: The node attempts to send a "typing" indicator before sending the message; failure here is logged but does not stop execution.
  • General network or API errors: Check internet connectivity and Zalo API service status.
  • If the node is set to continue on fail, errors will be returned in the output JSON with success: false and an error message.

Links and References

Discussion