Actions10
Overview
This node manages interactions with Zalo users, specifically providing operations to handle friend requests, user blocking, profile updates, retrieving user info, and message management within Zalo. The "Thu hồi tin nhắn" (Undo Message) operation allows users to revoke or delete a previously sent message in a conversation thread.
Common scenarios for this node include automating social interactions on Zalo such as accepting or sending friend requests, managing contacts, updating user profiles, and controlling messages programmatically. For example, a business could use it to automatically retract incorrect messages sent to customers or manage friend lists based on certain triggers.
The "Undo Message" operation is particularly useful when you want to programmatically remove a message from a chat thread, for instance, if a message was sent by mistake or contains sensitive information.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The identifier of the user or conversation thread where the message to undo exists. |
| Thread Type | The type/category of the user or thread (e.g., individual, group). |
| msgId | The unique identifier of the message to be undone (revoked). |
| cliMsgId | The client-side message ID corresponding to the message to be undone. |
Output
The output JSON object contains:
status: A string indicating the success status, typically"Thành công"meaning "Success".response: The raw response from the Zalo API after attempting to undo the message. This may include details about the operation result or error information if any.
Example output structure:
{
"status": "Thành công",
"response": {
// API response details here
}
}
No binary data output is produced by this operation.
Dependencies
- Requires an active Zalo API credential with valid authentication tokens including cookie, IMEI, and user agent.
- Uses the external
zca-jslibrary to interact with the Zalo API. - The node expects these credentials to be configured properly in n8n before execution.
Troubleshooting
Common issues:
- Invalid or expired credentials can cause login failure, resulting in no API instance found error.
- Incorrect or missing message IDs (
msgIdorcliMsgId) will prevent the message from being undone. - Providing wrong
threadIdorthreadTypemay lead to failure in locating the message.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node failed to authenticate with Zalo API. Check your API key, cookie, IMEI, and user agent values.- Errors related to message undoing usually come from invalid parameters or permissions; verify all IDs and types are correct.
Resolution tips:
- Ensure credentials are up-to-date and correctly entered.
- Double-check all input properties for correctness.
- Use the continue-on-fail option to handle errors gracefully during batch processing.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (for the underlying Zalo API client used)
- n8n Documentation on Creating Custom Nodes