Zalo User icon

Zalo User

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

Overview

This node allows interaction with Zalo user accounts through various operations such as sending friend requests, accepting friend requests, blocking/unblocking users, updating profile settings, retrieving user info, managing friends list, and handling message states. It is particularly useful for automating social interactions on the Zalo platform, such as managing contacts or messaging workflows.

The "Gửi Lời Mời Kết Bạn" (Send Friend Request) operation specifically enables sending a friend request to a specified Zalo user along with a custom message. This can be used in scenarios like automating outreach campaigns, onboarding new contacts, or integrating Zalo social features into broader automation processes.

Properties

Name Meaning
User ID The unique identifier of the Zalo user to whom the friend request will be sent.
Message The accompanying message text that will be sent along with the friend request invitation.

Output

The output JSON object contains:

  • status: A string indicating the result status, typically "Thành công" meaning "Success".
  • response: The raw response data returned from the Zalo API after attempting to send the friend request. This may include confirmation details or error information from the API.

Example output structure:

{
  "status": "Thành công",
  "response": { /* API response object */ }
}

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.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured properly in n8n before execution.

Troubleshooting

  • Invalid Credentials: If the node throws an error about missing or invalid API instance, verify that the Zalo API credentials are correctly set up with valid cookie, IMEI, and user agent values.
  • API Errors: Errors returned from the Zalo API (e.g., user not found, request limit exceeded) will appear in the response field or as thrown errors. Check the message for specific causes.
  • Continue On Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error messages per item.
  • Common Error Messages:
    • "No API instance found. Please make sure to provide valid credentials." — Indicates missing or invalid authentication details.
    • Other errors from the Zalo API should be inspected in the response or error message for resolution steps.

Links and References

Discussion