Actions2
- Zalo Send Message Actions
Overview
This node allows sending message status updates (specifically typing indicators) through the Zalo messaging platform using its API. It is useful when you want to programmatically indicate that a user or group is currently typing in a chat thread, enhancing real-time communication experiences.
Typical use cases include:
- Bots or automation workflows signaling typing status to users or groups before sending actual messages.
- Integrations where showing typing activity improves user engagement or feedback.
- Monitoring and updating chat states in customer support or notification systems.
For example, a workflow could trigger this node to send a "typing" status to a specific user thread while preparing a response, making the interaction feel more natural.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The unique identifier of the chat thread where the typing status will be sent. |
| Type | The type of the message recipient: either a single User (User) or a Group (Group). |
Output
The node outputs a JSON object with the following structure:
success: A boolean indicating if the typing status was sent successfully.message: A string confirming the operation, typically"OK"on success.
Example output JSON:
{
"success": true,
"message": "OK"
}
No binary data is produced by this node.
Dependencies
- Requires an API key credential for Zalo with valid authentication cookies, IMEI, and user agent information.
- Uses the external
zca-jslibrary to interact with the Zalo API. - Relies on helper functions for image handling in other operations (not relevant here).
- Needs proper configuration of credentials within n8n to authenticate requests.
Troubleshooting
Common issues:
- Failure to initialize the Zalo API due to invalid or expired credentials.
- Errors sending typing events if the thread ID or type is incorrect.
- Network or API errors from Zalo service interruptions.
Error messages:
"Failed to initialize Zalo API. Check your credentials."
Resolution: Verify that the provided API credentials (cookie, IMEI, user agent) are correct and have not expired."Zalo login error: <error message>"
Resolution: Inspect the detailed error message for authentication problems; reauthenticate or update credentials as needed."Zalo API not initialized"
Resolution: Ensure the node successfully logged into the Zalo API before attempting to send typing events."Cannot send typing event"
Resolution: This indicates failure in sending the typing status; check thread ID validity and network connectivity.
If the node is set to continue on fail, it will return an error object in the output JSON instead of stopping execution.
Links and References
- Zalo Official API Documentation (for general API reference)
- zca-js GitHub Repository (library used for Zalo API integration)
(Note: Replace with actual URL if available)