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 a friend request from another Zalo user by specifying their user ID.

Common scenarios where this node is useful include automating social media management tasks such as automatically accepting incoming friend requests on Zalo accounts used for business or community engagement, thereby streamlining user connection workflows.

For example, if you run a customer support channel on Zalo, you can use this node to automatically accept friend requests from customers, enabling further communication without manual intervention.

Properties

Name Meaning
User ID The ID of the Zalo user whose friend request you want to accept. This must be provided as a string and is required for the operation.

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 JSON structure:

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

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including an API key credential with cookie, IMEI, and user agent information.
  • The node uses an external library (zca-js) to interact with the Zalo API.
  • Proper configuration of these credentials in n8n is necessary for successful authentication and API calls.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials will cause authentication failures.
    • Providing an incorrect or non-existent User ID will result in errors from the Zalo API.
    • Network connectivity problems can prevent API calls from succeeding.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      This indicates missing or invalid credentials. Verify that the API key credential is correctly set up with valid cookie, IMEI, and user agent values.
    • Errors returned from the Zalo API (e.g., user not found, permission denied) will be passed through. Check the error message for specifics and ensure the User ID is correct and accessible.
  • To handle errors gracefully, enable the "Continue On Fail" option in the node settings to process subsequent items even if one fails.

Links and References

Discussion