Actions12
Overview
This node interacts with the Zalo messaging platform as a "Zalo User" resource. Specifically, the "Thu Hồi Tin Nhắn" (Undo Message) operation allows users to revoke or delete a previously sent message in a chat thread. This is useful when you want to remove a message that was sent by mistake or contains incorrect information.
Common scenarios include:
- Automatically retracting messages sent in error.
- Managing conversations by deleting sensitive or outdated messages.
- Implementing moderation tools that can undo messages programmatically.
Example: You have a chat thread with a user and want to undo a specific message identified by its message ID and client message ID. Using this node, you provide those IDs along with the thread details, and the message will be revoked on Zalo.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The unique identifier of the user or chat thread where the message was sent. |
| Thread Type | The type/category of the user or thread (e.g., individual user, group chat). |
| msgId | The unique message ID of the message to be undone (revoked). |
| cliMsgId | The client-side message ID corresponding to the message to be undone. |
Output
The node outputs a JSON object containing:
status: A string indicating the result status, typically"success"if the undo operation succeeded.response: The raw response from the Zalo API after attempting to undo the message. This may contain additional details about the operation's success or failure.
No binary data output is involved in this operation.
Example output JSON structure:
{
"status": "success",
"response": {
// API response details here
}
}
Dependencies
- Requires an active connection to the Zalo API via an API key credential configured in n8n.
- The node uses stored authentication cookies, device IMEI, and user agent strings to authenticate requests.
- No other external dependencies are required beyond the Zalo API access.
Troubleshooting
Common issues:
- Invalid or expired authentication credentials may cause the undo operation to fail.
- Providing incorrect
threadId,msgId, orcliMsgIdwill result in errors or no action. - Network connectivity problems can prevent communication with the Zalo API.
Error messages:
- If the node throws an error related to authentication, verify that your API key and session data are valid and up to date.
- Errors indicating missing parameters mean one or more required inputs (
threadId,threadType,msgId,cliMsgId) were not provided or are empty. - API response errors should be checked for rate limits or permission issues on the Zalo side.
Resolution tips:
- Double-check all input property values for correctness.
- Refresh or reauthenticate your Zalo API credentials in n8n.
- Ensure network access to the Zalo API endpoints is available.
Links and References
- Zalo Official Developer Documentation
- Zalo Messaging API Reference
- n8n Documentation on Creating Custom Nodes