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 "Undo Message" operation allows users to revoke or recall a previously sent message in a conversation thread.
Common scenarios for this node include:
- Automating friend request management (accepting, sending, blocking).
- Retrieving or updating user profile information.
- Managing friends list and aliases.
- Undoing messages that were sent by mistake or need to be retracted.
Practical example:
If you accidentally send a wrong message to a contact on Zalo, you can use the "Undo Message" operation to revoke that message programmatically, ensuring it no longer appears in the chat.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The unique identifier of the conversation thread where the message was sent. |
| Thread Type | The type/category of the user or conversation thread (e.g., individual, group). |
| 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 contains:
status: A string indicating the success status, typically"Thành công"(meaning "Success").response: The detailed response object returned from the Zalo API after attempting to undo the message. This may include confirmation details or error information if applicable.
No binary data is output by this operation.
Example output structure:
{
"status": "Thành công",
"response": {
// API response details about the undo message action
}
}
Dependencies
- Requires an API key credential to authenticate with the Zalo platform.
- Uses stored credentials including cookie, IMEI, and user agent strings to establish a session.
- Depends on the external
zca-jslibrary to interact with the Zalo API. - Node configuration must include valid Zalo API credentials with appropriate permissions.
Troubleshooting
Common issues:
- Invalid or expired credentials leading to authentication failure.
- Incorrect
threadId,msgId, orcliMsgIdcausing the undo operation to fail. - Network connectivity problems preventing API calls.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Resolution: Verify that the Zalo API credentials are correctly configured and not expired.- Errors related to invalid parameters usually indicate incorrect IDs; double-check the values provided.
- If the node throws errors but "Continue On Fail" is enabled, the error message will appear in the output JSON under
error.
Links and References
- Zalo Official Developer Documentation (for API details and authentication)
- n8n Documentation (for general node usage and credential setup)