Zalo User icon

Zalo User

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

Overview

This node enables interaction with Zalo user accounts through various operations such as sending friend requests, accepting friend requests, blocking/unblocking users, changing account settings or avatar, retrieving user information, and searching for users. It is particularly useful for automating social interactions on the Zalo platform, managing contacts, and integrating Zalo user management into workflows.

A practical example is automating the process of sending personalized friend requests to multiple users by specifying their User IDs and accompanying messages, which can help in marketing campaigns or community building.

Properties

Name Meaning
User ID The unique identifier of the Zalo user to whom the friend request will be sent.
Message The message text that accompanies the friend request invitation.

Output

The node outputs JSON objects containing:

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

Each output item corresponds to an input item, paired by index.

For the "sendFriendRequest" operation, the output confirms the request was sent successfully along with any additional response details from the API.

No binary data output is produced by this node.

Dependencies

  • Requires a valid Zalo API credential including authentication cookies, device IMEI, and user agent strings.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured properly within n8n to establish authenticated sessions.

Troubleshooting

  • Common Issues:

    • Invalid or expired credentials may cause login failures.
    • Missing required parameters like User ID or Message will result in errors.
    • Network issues or API rate limits could interrupt operations.
  • Error Messages:

    • "No API instance found. Please make sure to provide valid credentials."
      This indicates failure to authenticate with Zalo API. Verify that the API key credential is correctly set up and contains valid cookie, IMEI, and user agent values.
    • Errors thrown during individual operations include the error message from the API. If "Continue On Fail" is enabled, the node will output the error message per item instead of stopping execution.

Links and References

Discussion