Actions9
Overview
This node manages Zalo user accounts by interacting with the Zalo platform through an API. It supports various operations related to user management, 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 specific operation "Thay đổi cài đặt tài khoản" (Change Account Setting) 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 new users.
- Maintain consistent user metadata across multiple systems integrated with Zalo.
Properties
Name | Meaning |
---|---|
Name | Display name of the user to be set |
Date of Birth | User's date of birth in the format YYYY-MM-DD |
Gender | User's gender; options are Male (1), Female (2), Other (3) |
Language | Preferred language code for the user, e.g., "vi" for Vietnamese, "en" for English (optional) |
Output
The output JSON 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 operation, which may include updated user details or confirmation data.
Example output structure:
{
"status": "Thành công",
"response": {
// API response fields confirming the update
}
}
No binary data output is produced by this operation.
Dependencies
- Requires a valid Zalo API credential containing authentication details such as cookies, device IMEI, and user agent strings.
- Uses the
zca-js
library to interact with the Zalo API. - The node expects these credentials to be configured properly within n8n before execution.
Troubleshooting
Common issues:
- Invalid or expired API credentials leading to authentication failures.
- Incorrectly formatted date of birth (should be YYYY-MM-DD).
- Missing required parameters like name, dob, or gender.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Resolution: Verify that the Zalo API credentials are correctly set up and contain valid cookie, IMEI, and user agent values.- Errors related to parameter validation will indicate missing or invalid inputs; ensure all required fields are provided and correctly formatted.
If the node is set to continue on fail, errors for individual items will be returned in the output JSON under an
error
field.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (library used for Zalo API interaction)