Actions10
Overview
This node manages interactions with Zalo users, specifically providing operations related to user management on the Zalo platform. The "Undo Message" operation allows you to revoke or retract a previously sent message in a conversation thread. This is useful when you want to delete a message that was sent by mistake or contains incorrect information.
Practical examples:
- Automatically retracting messages sent in error during customer support chats.
- Implementing a feature to allow users to undo their last message within a chat application integrated with Zalo.
- Moderating conversations by removing inappropriate messages programmatically.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The 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 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's result.
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 connection to the Zalo API via valid credentials including an API key credential and session cookie.
- The node uses an external library (
zca-js) to interact with the Zalo API. - Proper configuration of credentials in n8n is necessary, including cookie, IMEI, and user agent values for authentication.
Troubleshooting
Common issues:
- Invalid or expired credentials can cause authentication failures.
- Incorrect
threadId,msgId, orcliMsgIdparameters will prevent the message from being found and undone. - Network connectivity problems may interrupt communication with the Zalo API.
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 not expired.- Errors related to missing or invalid parameters will indicate which input is problematic; ensure all required fields are provided and accurate.
- If the node throws errors but
Continue On Failis enabled, it will return the error message in the output JSON under theerrorfield.