Zalo User icon

Zalo User

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

Overview

This node allows 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 info, and more. It is useful for automating social interactions on the Zalo platform, managing contacts, and customizing user profiles programmatically.

A practical example is using this node to send a personalized friend request message to multiple Zalo users automatically, which can be beneficial for 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 accompanying message text that will be sent along with the friend request invitation.

Output

The output JSON contains:

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

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

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including cookie, device IMEI, and user agent information.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured in n8n under a generic API key credential setup.
  • Proper authentication cookies and device identifiers must be provided for successful API calls.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication cookies may cause login failures.
    • Missing or incorrect device IMEI or user agent strings can lead to API rejection.
    • Network connectivity problems can prevent communication with the Zalo API.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      This indicates failure to authenticate with Zalo API. Verify that the credentials are correctly set and not expired.
    • Errors thrown during execution include the specific error message from the API; enabling "Continue On Fail" allows processing subsequent items despite errors.
  • Resolution tips:

    • Ensure all required credential fields (cookie, IMEI, user agent) are correctly configured.
    • Refresh or regenerate authentication tokens if expired.
    • Check network access and firewall settings.

Links and References

Discussion