Zalo User icon

Zalo User

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

Overview

This node allows you to interact with Zalo user accounts within n8n workflows. Specifically, for the "Lấy thông tin người dùng" (Get User Info) operation under the "Zalo User" resource, the node retrieves detailed information about a specified Zalo user by their User ID. This is useful in scenarios where you need to fetch and process user profile data from Zalo, such as enriching contact records, verifying user identities, or automating customer support tasks.

Example use cases:

  • Automatically fetching Zalo user details when a new lead is added to your CRM.
  • Verifying Zalo user information before sending personalized messages.
  • Integrating Zalo user data into other business processes or databases.

Properties

Name Type Meaning
User ID String ID của người dùng cần lấy thông tin (User ID to retrieve information for)

Output

The output will be a JSON object containing the user's information as returned by the Zalo API. The exact structure depends on the Zalo API's response to the getUserInfo call, but typically includes fields such as user name, avatar, status, and other profile details.

Example output:

{
  "id": "123456789",
  "name": "Nguyen Van A",
  "avatar": "https://example.com/avatar.jpg",
  "status": "Online",
  // ...other user profile fields
}

Dependencies

  • External Service: Requires access to the Zalo API via the zca-js library.
  • Credentials: You must provide valid Zalo credentials (zaloApi) including:
    • Cookie
    • IMEI
    • User Agent
  • These credentials are configured in n8n as a credential type named "Zalo Credential to connect with".

Troubleshooting

  • Invalid Credentials:
    Error: "No API instance found. Please make sure to provide valid credentials."
    Resolution: Ensure that your Zalo credentials (cookie, IMEI, user agent) are correct and up-to-date in n8n.

  • User Not Found or Invalid User ID:
    If the provided User ID does not exist or is incorrect, the Zalo API may return an error.
    Resolution: Double-check the User ID value.

  • API Rate Limits or Temporary Bans:
    Excessive requests or invalid login attempts may trigger rate limits or bans from Zalo.
    Resolution: Space out your requests and ensure credentials are not shared across multiple bots.

  • Network Issues:
    Errors related to network connectivity can prevent successful API calls.
    Resolution: Check your internet connection and any firewall settings.

Links and References

Discussion