Zalo User icon

Zalo User

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

Overview

This node manages Zalo user interactions, specifically allowing automation of friend-related actions on the Zalo platform. The "Chấp nhận lời mời kết bạn" (Accept Friend Request) operation enables users to programmatically accept incoming friend requests by specifying the user ID of the requester.

Common scenarios where this node is beneficial include:

  • Automating social media management workflows for businesses or influencers who receive many friend requests.
  • Integrating Zalo user management into broader CRM or marketing automation systems.
  • Streamlining community management by automatically accepting trusted contacts.

Example: Automatically accept all pending friend requests from a list of user IDs retrieved from another system.

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 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 raw response returned by the Zalo API after accepting the friend request. This may include confirmation details or metadata about the accepted request.

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including an API key credential that provides cookie, 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 beforehand.
  • No additional environment variables are explicitly required beyond the credential setup.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials can cause failure to authenticate with the Zalo API.
    • Providing an incorrect or non-existent User ID will result in errors from the API.
    • Network connectivity problems may prevent successful API calls.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not initialize the Zalo API client due to missing or invalid credentials. Verify your API key and credential configuration.
    • Errors thrown during execution typically contain the API error message. If continueOnFail is enabled, errors will be returned in the output JSON under the error field for each failed item.
  • Resolution tips:

    • Double-check the User ID values passed to the node.
    • Ensure the Zalo API credentials are up-to-date and correctly entered.
    • Enable continueOnFail if you want the workflow to proceed despite individual errors.

Links and References

Discussion