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

Actions2

Overview

This node allows sending message status updates (specifically typing indicators) through the Zalo messaging platform using its API. It is useful when you want to programmatically indicate that a user or group chat is currently typing, enhancing real-time communication experiences in automation workflows.

A practical example is integrating this node into a chatbot workflow where, before sending an actual message, the bot signals to the recipient(s) that it is "typing," making interactions feel more natural and responsive.

Properties

Name Meaning
Thread ID The unique identifier of the thread (chat) where the typing status will be sent.
Type The type of the message thread: either "User" for one-on-one chats or "Group" for group chats.

Output

The node outputs a JSON object with the following structure:

  • success: Boolean indicating if the typing event was successfully sent.
  • message: A simple confirmation string "OK" upon success.

Example output:

{
  "success": true,
  "message": "OK"
}

No binary data is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including a cookie, device IMEI, and user agent string.
  • The node uses an external Zalo API client library to interact with Zalo services.
  • Proper configuration of these credentials in n8n is necessary for authentication and successful API calls.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials can cause login failures.
    • Network issues may prevent sending typing events.
    • Incorrect Thread ID or Type values might result in errors or no visible effect.
  • Error messages:

    • "Failed to initialize Zalo API. Check your credentials." indicates problems with authentication; verify the API key and cookie validity.
    • "Zalo login error: <error message>" points to login failure details; check credentials and network connectivity.
    • "Zalo API not initialized" means the node attempted to send a typing event without a successful login; ensure credentials are correct and the login step completes.
    • "Cannot send typing event" logged when the typing indicator could not be sent; this might be due to invalid thread info or temporary API issues.

To resolve these, confirm all credential fields are correctly set, the thread IDs exist and are accessible, and retry after some time if the issue persists.

Links and References

Discussion