Zalo CN User  icon

Zalo CN 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 Zalo by specifying the user ID of the requester.

Common scenarios where this node is useful include automating social media management tasks such as:

  • Automatically accepting friend requests from specific users or after certain conditions are met.
  • Integrating Zalo friend management into broader workflows like CRM systems or marketing automation.
  • Streamlining community management by handling friend requests without manual intervention.

For example, a business could use this node to automatically accept friend requests from customers who have submitted their contact details through a form, enabling immediate communication via Zalo.

Properties

Name Meaning
User ID The ID of the user whose friend request you want to accept. This must be provided as a string.

Output

The node outputs JSON data with the following structure:

{
  "status": "Thành công",
  "response": { /* response object from Zalo API */ }
}
  • status: A string indicating success ("Thành công" means "Success").
  • response: Contains the detailed response returned by the Zalo API when accepting the friend request. This typically includes confirmation and any relevant metadata about the accepted request.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Zalo API using valid credentials that include authentication cookies, device identifiers, and user agent strings.
  • The node depends on the external zalo-api-final library to interact with the Zalo platform.
  • Proper configuration of the Zalo API credential in n8n is necessary, including providing a valid cookie, IMEI, and user agent information.

Troubleshooting

  • Common Issues:

    • Invalid or expired authentication credentials can cause failures in connecting to the Zalo API.
    • Providing an incorrect or non-existent User ID will result in errors or no action taken.
    • Network connectivity issues may prevent successful API calls.
  • Error Messages:

    • "No API instance found. Please make sure to provide valid credentials."
      This indicates missing or invalid credentials. Verify that the Zalo API credential is correctly configured with valid authentication details.
    • Errors related to specific user IDs usually indicate that the user does not exist or the friend request cannot be accepted (e.g., already accepted or blocked).
  • Resolution Tips:

    • Double-check the User ID input for correctness.
    • Ensure the Zalo API credentials are up-to-date and have not expired.
    • Use the "Continue On Fail" option in n8n to handle individual item errors gracefully during batch processing.

Links and References

Discussion