Zalo User icon

Zalo User

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

Overview

This node manages Zalo user interactions, specifically for the "Zalo User" resource. The operation Chấp Nhận Lời Mời Kết Bạn (Accept Friend Request) allows you to programmatically accept incoming friend requests on a Zalo account.

Typical use cases include automating social media management tasks such as:

  • Automatically accepting friend requests from users.
  • Integrating Zalo friend management into CRM or marketing workflows.
  • Streamlining user engagement by handling friend requests without manual intervention.

For example, when a new friend request arrives, this node can be triggered to accept it immediately, ensuring timely connection and communication.

Properties

Name Meaning
User ID The ID of the user whose friend request you want to accept. This is a required string input.

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 after accepting the friend request. This may contain details about the accepted request or confirmation data.

Example output structure:

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

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential to authenticate with the Zalo platform.
  • The node uses stored credentials including cookie, IMEI, and user agent strings to establish a session with Zalo's API.
  • The external library zca-js is used internally to interact with the Zalo API.

Ensure that the Zalo API credentials are correctly configured in n8n before using this node.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause login failure.
    • Missing or incorrect User ID will prevent the acceptance of the friend request.
    • Network or API rate limits could cause intermittent failures.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node failed to authenticate with Zalo. Verify your API credentials and ensure they are up to date.
    • Errors thrown during execution will include the message from the underlying API call. If continueOnFail is enabled, errors will be returned in the output JSON under the error field.
  • Resolution tips:

    • Double-check the User ID input for correctness.
    • Refresh or re-enter API credentials if authentication fails.
    • Enable continueOnFail to handle errors gracefully in batch operations.

Links and References

Discussion