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 "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 media management tasks such as accepting or sending friend requests, blocking/unblocking users, updating profile information, retrieving user details, managing friends lists, and undoing messages that were sent by mistake or need to be retracted.
Practical example:
- Automatically undo a message sent to a specific user or group chat if certain conditions are met (e.g., message contains sensitive info or was sent in error).
- Batch process multiple undo message requests based on input data.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The identifier of the conversation thread where the message to undo was sent. |
| Thread Type | The type/category of the user or conversation thread (e.g., individual chat, group chat). |
| msgId | The unique ID of the message to be undone (revoked). |
| cliMsgId | The client-side message ID corresponding to the message to undo. |
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 confirmation details or error information from the API.
Example output JSON:
{
"status": "Thành công",
"response": {
// API response details about the undo operation
}
}
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. - Node configuration must include these credentials to establish a session before performing operations.
Troubleshooting
Common issues:
- Invalid or expired credentials leading to failure in establishing API connection.
- Incorrect or missing message IDs (
msgIdorcliMsgId) causing the undo operation to fail. - Using wrong thread type or thread ID that does not correspond to the message.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node could not authenticate with Zalo API. Check your API key, cookie, IMEI, and user agent values.- Errors returned from the Zalo API in the
responsefield may indicate invalid parameters or permission issues.
Resolution tips:
- Verify all required properties are correctly set and correspond to existing messages.
- Ensure credentials are up-to-date and have necessary permissions.
- Use the "Continue On Fail" option to handle errors gracefully when processing multiple items.
Links and References
- Zalo Official Developer Documentation (for API reference and authentication details)
- n8n Documentation (for general node usage and credential setup)