Actions10
Overview
This node manages Zalo user account settings and interactions. It is useful for automating tasks related to a Zalo user's profile and social connections, such as updating personal information, managing friend requests, blocking/unblocking users, and retrieving user data.
A practical example is updating a user's display name, date of birth, and gender in bulk from an external database or CRM system. Another use case is automating friend request acceptance or sending personalized messages to new contacts.
Specifically, the "Thay đổi cài đặt tài khoản" (Change Account Setting) operation allows updating the user's profile details like name, date of birth, and gender.
Properties
| Name | Meaning |
|---|---|
| Name | The display name of the user. |
| Date of Birth | The user's date of birth in the format YYYY-MM-DD. |
| Gender | The user's gender. Options: Male (1), Female (2), Other (3). |
| Language | (Optional) The language preference, e.g., "vi" for Vietnamese or "en" for English. |
Output
The output JSON contains:
status: A string indicating success, typically "Thành công" (Success).response: An object with the API response from updating the profile.
Example output JSON:
{
"status": "Thành công",
"response": {
// API response details about the updated profile
}
}
No binary data output is produced by this operation.
Dependencies
- Requires a valid Zalo API credential with authentication details including cookie, IMEI, and user agent.
- Uses the
zca-jslibrary to interact with the Zalo API. - The node expects these credentials to be configured in n8n beforehand.
Troubleshooting
- No API instance found: This error occurs if the provided credentials are invalid or missing required fields like cookie, IMEI, or user agent. Ensure that the API key credential is correctly set up and contains all necessary authentication data.
- API call failures: If the updateProfile API call fails, check the input parameters for correctness (e.g., valid date format for DOB, allowed values for gender).
- Continue on Fail: If enabled, the node will continue processing other items even if one item fails, returning error messages in the output JSON under the
errorfield.
Links and References
- Zalo Official API Documentation
- n8n Documentation - Creating Custom Nodes
- zca-js GitHub Repository (for the underlying Zalo API client library)