Actions12
Zalo User → Thu Hồi Tin Nhắn
AI-generatedOverview
The Zalo User node enables management of Zalo user interactions and messaging through various operations. Specifically, the "Thu Hồi Tin Nhắn" (Undo Message) operation allows users to recall or retract a previously sent message in a chat thread. This is useful in scenarios where a message was sent by mistake or needs to be removed from the conversation for privacy or correction purposes.
Practical examples include:
- Automatically recalling messages containing sensitive information.
- Allowing users to undo messages sent in error within automated workflows.
- Managing chat threads by programmatically removing unwanted messages.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The unique identifier of the user or chat thread from which the message will be recalled. |
| Thread Type | The type/category of the user or thread (e.g., individual, group). |
| 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 output JSON contains:
status: A string indicating the success status, typically"Thành công"meaning "Success".response: The raw response object returned from the API call that performs the message recall. This may contain details about the recall operation result.
Example output structure:
{
"status": "Thành công",
"response": {
// API response details about the undo message operation
}
}
The node does not output binary data.
Dependencies
- Requires an API key credential to connect to the Zalo platform.
- Uses stored credentials including cookie, IMEI, and user agent strings to authenticate API requests.
- Depends on the external
zca-jslibrary for interacting with the Zalo API. - Requires proper configuration of the Zalo API credentials in n8n to function correctly.
Troubleshooting
Common issues:
- Invalid or expired credentials leading to authentication failures.
- Incorrect
threadId,msgId, orcliMsgIdcausing the undo operation to fail. - Network or API rate limiting errors from the Zalo service.
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 valid.- Errors related to missing or invalid parameters (
threadId,msgId, etc.)
Resolution: Ensure all required fields are provided and correctly formatted. - API errors returned in the
responsefield may indicate specific issues such as permission denied or message not found.
Enabling "Continue On Fail" allows the workflow to proceed even if some items fail, capturing error messages in the output.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation on Credentials
- zca-js GitHub Repository (Note: Replace with actual URL if available)