Actions10
Overview
This node manages interactions with Zalo users through the Zalo API, specifically for a "Zalo User" resource. The operation "Thu Hồi Tin Nhắn" (Undo Message) allows you to recall or delete a previously sent message in a chat thread with a user.
Typical use cases include:
- Automatically retracting messages sent by mistake.
- Managing conversations programmatically by removing sensitive or incorrect messages.
- Integrating message recall functionality into automated workflows for customer support or marketing.
For example, after sending a message via another operation, you might want to undo it if certain conditions are met, such as detecting an error in the message content.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The unique identifier of the user or conversation thread where the message was sent. |
| Thread Type | The type/category of the user or thread (e.g., individual chat, group chat). |
| msgId | The unique identifier of the message to be undone (recalled). |
| cliMsgId | The client-side message ID associated with the message to be undone. |
Output
The node outputs a JSON object containing:
status: A string indicating the success status, typically"Thành công"(meaning "Success").response: The raw response from the Zalo API regarding the undo message request, which may include details about the operation's result.
Example output JSON structure:
{
"status": "Thành công",
"response": {
// API response details here
}
}
No binary data is produced by this node.
Dependencies
- Requires valid Zalo API credentials including authentication tokens such as cookies, device IMEI, and user agent strings.
- The node uses the external
zalo-api-finallibrary to interact with the Zalo platform. - Credentials must be configured properly in n8n to allow successful login and API calls.
Troubleshooting
Common issues:
- Invalid or expired credentials leading to failed login attempts.
- 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 up to date.- Errors returned from the Zalo API will be passed through; these often indicate invalid parameters or permission issues. Verify all IDs and types are correct.
To handle errors gracefully, enable the "Continue On Fail" option in the node settings to process subsequent items even if one fails.
Links and References
- Zalo Official Developer Documentation
- Zalo API Node.js SDK (zalo-api-final) (for reference on API methods used)