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 by managing friend connections without manual intervention.

For example, a marketing automation workflow could use this node to accept friend requests from potential customers before sending welcome messages or promotional content.

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 an active connection to the Zalo API via credentials that provide:

    • A valid cookie string.
    • Device IMEI identifier.
    • User agent string.
  • These credentials must be configured in n8n prior to using the node.

  • The node uses an external library (zca-js) to interact with the Zalo API.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials (cookie, IMEI, user agent) 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 successful API calls.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node failed to authenticate with Zalo due to missing or invalid credentials. Verify your 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:

    • Double-check the API credentials and ensure they are up to date.
    • Confirm the User ID exists and is correct.
    • Enable "Continue On Fail" in the node settings to handle individual item errors gracefully.

Links and References

Discussion