Zalo User icon

Zalo User

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

Overview

This node allows you to manage Zalo users by interacting with the Zalo platform through various user-related operations. Specifically, for the "Gửi lời mời kết bạn" (Send Friend Request) operation, it enables sending a friend request to a specified Zalo user along with a custom message.

Common scenarios where this node is beneficial include automating social engagement workflows, such as:

  • Automatically sending friend requests to new contacts collected from other sources.
  • Personalizing connection requests with custom messages to increase acceptance rates.
  • Integrating Zalo user management into broader marketing or CRM automation pipelines.

Example: You have a list of potential customers' Zalo user IDs and want to send each a personalized friend request message automatically.

Properties

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

Output

The node outputs a JSON object for each input item processed, structured as follows:

{
  "status": "Thành công",
  "response": { /* response data from Zalo API about the friend request */ }
}
  • status: A string indicating success ("Thành công" means "Success").
  • response: Contains the raw response returned by the Zalo API after attempting to send the friend request. This may include details such as request status or any metadata provided by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential to authenticate with the Zalo platform.
  • Uses stored credentials including cookie, device IMEI, and user agent strings to establish a session.
  • Depends on the external zca-js library to interact with the Zalo API.
  • Proper configuration of the Zalo API credentials in n8n is necessary before using this node.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials can cause authentication failures.
    • Incorrect or missing User ID will result in errors when sending the friend request.
    • Network connectivity problems may prevent communication with the Zalo API.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not authenticate with Zalo. Verify your API credentials and ensure they are correctly configured.
    • Errors related to invalid parameters typically indicate missing or malformed inputs like User ID or Message.
    • If the node throws errors but "Continue On Fail" is enabled, it will output error messages per item instead of stopping execution.

To resolve these issues:

  • Double-check the API credentials and refresh them if needed.
  • Ensure all required properties (User ID and Message) are provided and valid.
  • Confirm network access to the Zalo API endpoints.

Links and References

Discussion