Overview
This node is a trigger designed to listen for incoming messages on the Zalo platform, specifically targeting user and group messages. It can be configured to listen to different types of message events and optionally process voice messages by converting them into text using speech-to-text technology. The node supports automatic or manual language detection for voice messages, enhancing its flexibility in multilingual environments.
Common scenarios where this node is beneficial include:
- Automating responses or workflows based on incoming user or group messages.
- Transcribing voice messages into text for further processing, such as sentiment analysis or keyword extraction.
- Filtering messages to exclude those sent by the bot itself to avoid feedback loops.
- Supporting multiple languages with configurable detection modes.
Practical examples:
- A customer support workflow that triggers when a user sends a message, transcribes any voice notes, and routes the content to the appropriate department.
- A chatbot that listens to group conversations, processes voice inputs, and responds accordingly.
- An analytics pipeline that collects and analyzes text from both typed and voice messages in Vietnamese, English, or Chinese.
Properties
| Name | Meaning |
|---|---|
| Event Types | Types of messages to listen for. Options: User Messages, Group Messages. |
| Self Listen | Whether to allow listening to messages sent by yourself (the bot). Boolean true/false. |
| Enable Voice Processing | Whether to enable voice message to text processing. Boolean true/false. |
| Chế độ nhận diện ngôn ngữ (Language Detect Mode) | Language detection mode for voice messages. Options: Automatic (less accurate), Manual. Shown only if voice processing is enabled. |
| Ngôn ngữ thủ công (Manual Language) | Language selection when manual mode is chosen. Options: Vietnamese, English, Chinese. Shown only if manual detection mode is selected. |
Output
The node outputs JSON data representing the received message event. If voice processing is enabled and a voice message is received, the output includes a transcription of the voice message text along with detected language information and confidence scores.
Key fields in the output JSON include:
message: The original message object received from Zalo.voiceText: The transcribed text from a voice message, if applicable.detectedLanguage: The language code detected for the voice message text.score: A confidence score indicating the quality or reliability of the transcription.- Additional metadata related to the message event.
If binary data is involved (e.g., audio files), it is processed internally but not directly outputted; instead, the node outputs the transcription result.
Dependencies
- Requires an API key credential for authenticating with the Zalo platform.
- Optionally requires an API token credential for accessing a third-party speech-to-text service.
- Uses FFmpeg installed on the host system to convert audio formats (e.g., to MP3).
- Relies on external HTTP requests to fetch and process voice message audio data.
- Uses language detection libraries and algorithms to determine the language of transcribed text.
Troubleshooting
- Connection Issues: If the node fails to connect to Zalo, ensure the API key credential is valid and the network connection is stable.
- Voice Processing Errors: Errors during voice transcription may occur if FFmpeg is not installed or accessible, or if the speech-to-text API token is missing or invalid.
- Language Detection Accuracy: Automatic language detection may have lower accuracy; switching to manual mode with explicit language selection can improve results.
- Message Listening Configuration: Ensure the correct event types are selected; otherwise, the node may not trigger as expected.
- Error Messages:
- "Zalo connection failed": Indicates failure to establish connection with Zalo API.
- "Error processing voice": Indicates issues during voice message transcription, possibly due to audio conversion or API errors.
- "Missing or invalid credentials": Check that all required credentials are properly configured in n8n.
Links and References
- Zalo Official API Documentation
- FFmpeg Installation Guide
- [Speech-to-Text API Provider Documentation] (depends on the specific service used, e.g., Wit.ai)
- n8n Credential Setup
This summary is based solely on static analysis of the provided source code and property definitions.