Zalo User icon

Zalo User

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

Overview

The Zalo User node with the operation Thay đổi cài đặt tài khoản ("Change Account Setting") allows you to update a Zalo user's account settings, such as display name, date of birth, gender, and language. This is useful for automating user profile management tasks in workflows that interact with the Zalo platform, such as onboarding new users, updating user information based on external data sources, or synchronizing user profiles across systems.

Practical examples:

  • Automatically update a user's display name and language preference after they submit a form.
  • Batch-update user profiles with new information from an HR system.
  • Set default language and gender for new accounts during registration processes.

Properties

Name Type Meaning
Name String Tên hiển thị (Display name)
Date of Birth String Ngày sinh (Date of birth in YYYY-MM-DD format)
Gender Options Giới tính (Gender: Male=1, Female=2, Other=3)
Language String Ngôn ngữ (Language code, e.g., "vi" for Vietnamese, "en" for English)

Output

The output for this operation will be a JSON object with the following structure:

{
  "status": "Thành công",
  "response": { /* API response from Zalo */ }
}
  • status: Always set to "Thành công" (Success) if the operation completes without error.
  • response: Contains the raw response returned by the Zalo API after changing the account setting.

If an error occurs and "Continue On Fail" is enabled, the output will be:

{
  "error": "Error message"
}

Dependencies

  • External Service: Requires access to the Zalo API via the zca-js library.
  • Credentials: Needs valid Zalo credentials (zaloApi) including cookie, IMEI, and user agent.
  • n8n Configuration: The node must be configured with the appropriate Zalo credentials in n8n.

Troubleshooting

Common Issues:

  • Invalid Credentials: If the provided Zalo credentials (cookie, IMEI, user agent) are missing or incorrect, the node will throw an error:
    "No API instance found. Please make sure to provide valid credentials."
    Resolution: Double-check your Zalo credentials in n8n and ensure they are up-to-date.
  • Input Validation Errors: If required fields like Name, Date of Birth, or Gender are missing or incorrectly formatted, the Zalo API may reject the request.
    • Ensure "Date of Birth" is in YYYY-MM-DD format.
    • "Gender" must be one of the allowed options (1, 2, or 3).
  • API Errors: Any errors returned by the Zalo API will be included in the error field if "Continue On Fail" is enabled, or will stop execution otherwise.

Links and References

Discussion