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 behalf of a user or business account.
  • Integrating Zalo user management into broader workflows that handle customer engagement or community building.
  • Streamlining onboarding processes where new contacts are accepted automatically.

For example, a marketing automation workflow could use this node to accept friend requests received during a campaign, enabling immediate follow-up messaging.

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 of the operation, typically "Thành công" meaning "Success".
  • response: The raw response object returned by the Zalo API after accepting the friend request. This may contain additional details about the action's outcome.

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 an active connection to the Zalo API via credentials that include authentication cookies, device IMEI, and user agent information.
  • The node depends on the external zca-js library to interact with the Zalo API.
  • Proper configuration of the Zalo API credential in n8n is necessary, including valid authentication tokens/cookies.

Troubleshooting

  • Common issues:

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

    • "No API instance found. Please make sure to provide valid credentials."
      This indicates missing or invalid credentials. Verify your Zalo API credential setup.
    • Errors returned from the API (e.g., user not found, permission denied) will be thrown and can be caught if "Continue On Fail" is enabled.
  • Resolution tips:

    • Ensure the Zalo API credentials are up to date and correctly configured.
    • Double-check the User ID input for correctness.
    • Enable "Continue On Fail" to handle errors gracefully within workflows.

Links and References

Discussion