Actions10
Overview
This node manages interactions with Zalo users, specifically providing operations to handle friend requests, user info, messaging, and account settings on the Zalo platform. The "Undo Message" operation allows users to revoke or recall a previously sent message in a conversation thread.
Common scenarios for this node include:
- Automatically retracting messages sent by mistake.
- Managing friend relationships programmatically (accepting/blocking/unblocking).
- Retrieving user information or friends list for integration with other systems.
- Updating user profile details or aliases.
Practical example:
If you accidentally send a wrong message to a contact on Zalo, you can use the "Undo Message" operation to revoke that message automatically via an n8n workflow, preventing the recipient from seeing it.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The unique identifier of the conversation thread where the message was sent. |
| Thread Type | The type/category of the user or conversation thread (e.g., individual chat, group chat). |
| msgId | The unique identifier of the message to be undone (revoked). |
| cliMsgId | The client-side message ID associated with the message to be undone. |
Output
The output JSON contains:
status: A string indicating the success status, typically"Thành công"(meaning "Success").response: The raw response object returned from the Zalo API after attempting to undo the message.
Example output structure:
{
"status": "Thành công",
"response": {
// API response details about the undo operation
}
}
No binary data is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including cookie, IMEI, and user agent information.
- Uses the external
zca-jslibrary to interact with the Zalo API. - The node expects these credentials to be configured in n8n beforehand.
- Proper authentication tokens must be provided to successfully call the undo message API.
Troubleshooting
Common issues:
- Invalid or expired credentials leading to failure in creating the API instance.
- Incorrect
threadId,msgId, orcliMsgIdcausing the undo operation to fail. - Network or API rate limiting errors from Zalo.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node could not authenticate with Zalo. Check your API credentials and ensure they are correct and active.- Errors thrown during execution will include the error message from the Zalo API. If
continueOnFailis enabled, errors will be returned as part of the output JSON under anerrorfield.
Resolution tips:
- Verify all required input properties are correctly set.
- Refresh or re-enter API credentials if authentication fails.
- Ensure the message IDs correspond exactly to messages in the specified thread.
Links and References
- Zalo Official Developer Documentation (for API details)
- n8n Documentation (for general node usage and credential setup)
- zca-js GitHub Repository (library used to interface with Zalo API) (Note: Replace with actual repo if available)