Actions9
Overview
This node manages Zalo user accounts by interacting with the Zalo platform through an API. It supports various operations such as accepting or sending friend requests, blocking/unblocking users, changing account avatars, updating account settings, retrieving user information, listing friends, and finding users by phone number.
The "Thay đổi cài đặt tài khoản" (Change Account Setting) operation specifically allows updating a user's profile details including display name, date of birth, gender, and language preference.
Practical examples:
- Automatically update user profile information in bulk based on external data sources.
- Customize user account settings programmatically after onboarding or during profile updates.
- Integrate Zalo user management into broader automation workflows for customer engagement.
Properties
| Name | Meaning |
|---|---|
| Name | Display name of the Zalo user to set. |
| Date of Birth | User's birth date in the format YYYY-MM-DD. |
| Gender | User's gender; options are Male (1), Female (2), Other (3). |
| Language | Optional language code for the user interface, e.g., "vi" for Vietnamese, "en" for English. |
Output
The output JSON object contains:
status: A string indicating success, typically"Thành công"(Success).response: The raw response from the Zalo API for the change account setting request, which may include updated user details or confirmation data.
Example output structure:
{
"status": "Thành công",
"response": {
// API response fields related to the updated account settings
}
}
No binary data is output by this operation.
Dependencies
- Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
- The node uses an external Zalo API client library (
zca-js) to perform actions. - Credentials must be configured in n8n with appropriate API keys and session information.
Troubleshooting
Common issues:
- Invalid or expired authentication cookies can cause login failures.
- Missing or incorrect IMEI or user agent values may prevent successful API calls.
- Incorrect date format for the Date of Birth property will likely cause errors.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node failed to authenticate with Zalo API. Verify credentials and session data.- Errors returned from the API (e.g., invalid parameters) will be thrown and can be caught if "Continue On Fail" is enabled.
Resolutions:
- Ensure all required credential fields are correctly set and up to date.
- Validate input formats, especially dates and enumerated options like gender.
- Use "Continue On Fail" option to handle partial failures gracefully in batch operations.
Links and References
- Zalo Official Developer Documentation
- Zalo API Client Library (zca-js) (used internally by the node)