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 message status updates in Zalo conversations via the Zalo API. Specifically, the "Gửi trạng thái tin nhắn" (Send message status) operation sends a typing indicator or similar status to a specified conversation thread, either with an individual user or a group.

Typical use cases include:

  • Indicating to the recipient that you are typing a message.
  • Updating the conversation status programmatically during automated workflows.
  • Enhancing chatbot interactions by signaling activity status in real-time.

For example, before sending a message, the node can send a "typing" event to the chat thread to simulate a human-like interaction.

Properties

Name Meaning
ID cuộc trò chuyện / Thread ID The unique identifier of the conversation thread where the status will be sent.
Loại cuộc trò chuyện The type of conversation: either "Cá nhân" (Individual/User) or "Nhóm" (Group). Options: 0 (User), 1 (Group)

Output

The node outputs a JSON object indicating the success of the operation:

{
  "success": true,
  "message": "OK"
}
  • success: Boolean indicating if the status was sent successfully.
  • message: A simple confirmation string ("OK").

No binary data is output for this operation.

Dependencies

  • Requires valid Zalo API credentials configured in n8n, including authentication via cookies and device/user agent information.
  • The node uses the Zalo API client library internally to interact with Zalo services.
  • Proper credential setup is essential to initialize the Zalo API client successfully.

Troubleshooting

  • Common issues:

    • Failure to initialize the Zalo API client due to invalid or missing credentials.
    • Errors when sending typing events if the thread ID or type is incorrect.
    • Network or API errors from Zalo service interruptions.
  • Error messages and resolutions:

    • "Failed to initialize Zalo API. Check your credentials."
      Ensure that the Zalo API credentials (cookie, IMEI, user agent) are correctly set up and valid.
    • "Zalo login error: <error message>"
      Indicates problems authenticating with Zalo; verify credentials and network connectivity.
    • "Cannot send typing event" (logged as error)
      Usually non-fatal; may indicate temporary API limitations or invalid thread info.
    • If the node throws an error related to thread type or ID, double-check the input values correspond to existing conversations.

Links and References

Discussion