Zalo User icon

Zalo User

Quản lý người dùng Zalo

Overview

This node manages interactions with Zalo users, specifically enabling operations such as sending friend requests, accepting friend requests, blocking/unblocking users, changing user alias names, retrieving user information, and more. It is useful for automating social interactions on the Zalo platform, such as managing contacts or automating friend invitations with personalized messages.

A practical example is using this node to send a friend request to a specific user ID along with a custom message, which can be part of an automated marketing or networking workflow.

Properties

Name Meaning
User ID The unique identifier of the Zalo user to interact with (e.g., to send a friend request).
Message The message sent along with the friend request invitation.

Note: These properties are relevant when the Resource is "User" and the Operation is "Gửi lời mời kết bạn" (sendFriendRequest).

Output

The output JSON contains:

  • status: A string indicating the result status, typically "Thành công" meaning "Success".
  • response: The raw response object returned from the Zalo API for the performed operation.

Example output structure:

{
  "status": "Thành công",
  "response": { /* API response details */ }
}

No binary data output is produced by this node.

Dependencies

  • Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
  • Uses an external library (zca-js) to interact with the Zalo API.
  • The node expects these credentials to be configured in n8n beforehand.

Troubleshooting

  • Invalid Credentials: If the node cannot instantiate the API client, it throws an error indicating no API instance was found. Ensure that the provided credentials (cookie, IMEI, user agent) are valid and up to date.
  • API Errors: Any errors returned by the Zalo API during operations will cause the node to throw exceptions unless "Continue On Fail" is enabled, in which case the error message is included in the output.
  • Missing Required Parameters: Operations like sending a friend request require both User ID and Message. Omitting these will cause validation errors.
  • Rate Limits or API Restrictions: Frequent or bulk operations may hit Zalo API limits; handle such cases by implementing retries or delays.

Links and References

Discussion