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 chat is currently typing, enhancing real-time communication experiences in automation workflows.
Typical use cases include:
- Notifying chat participants that a message is being composed.
- Integrating with customer support bots to show typing status while processing requests.
- Automating presence signals in group conversations.
For example, a workflow could trigger this node to send a "typing" status to a specific user thread before sending an actual message, improving user experience by mimicking human-like interaction.
Properties
| Name | Meaning |
|---|---|
| Thread ID | The unique identifier of the thread (chat) where the typing status will be sent. |
| Type | The type of the message thread: either "User" (individual chat) or "Group" (group chat). |
Output
The node outputs a JSON object indicating the success or failure of the typing status update:
success: Boolean indicating if the operation was successful.message: A simple confirmation string"OK"on success.
Example output JSON:
{
"success": true,
"message": "OK"
}
No binary data is produced by this node.
Dependencies
- Requires valid Zalo API credentials including a cookie, device IMEI, and user agent string for authentication.
- Uses the
zca-jslibrary to interact with the Zalo API. - Requires proper configuration of these credentials in n8n prior to execution.
Troubleshooting
Common issues:
- Invalid or expired credentials can cause login failures.
- Incorrect thread IDs or types may result in failed typing event sends.
- Network or API downtime can interrupt communication.
Error messages:
"Failed to initialize Zalo API. Check your credentials."— Indicates problems with authentication; verify the provided cookie, IMEI, and user agent."Zalo login error: <error message>"— Details from the underlying API login failure."Zalo API not initialized"— The node attempted to send a typing event without a successful login."Cannot send typing event"— The typing event failed to send; check thread ID and network connectivity.
Resolution tips:
- Ensure credentials are up-to-date and correctly configured.
- Validate thread IDs and select the correct type (User or Group).
- Enable "Continue On Fail" in the node settings to handle intermittent errors gracefully.