Green API Get Voice
AI-generatedOverview
This node downloads and processes WhatsApp voice messages using the Green API. It supports multiple input sources for the voice message data, including message ID with chat ID, direct download URL, or data from a previous node. The node fetches the voice message file, converts it to a binary format, and outputs it along with optional metadata. This is useful for workflows that need to handle WhatsApp voice messages, such as archiving, transcription, or further audio processing.
Use Case Examples
- Download a voice message by specifying the WhatsApp message ID and chat ID to store the audio file in binary format for later use.
- Use a direct download URL to fetch a voice message audio file and include metadata like file size and MIME type in the output.
- Extract voice message data from a previous node's output, download the audio, and customize the filename using placeholders like timestamp, message ID, or chat ID.
Properties
| Name | Meaning |
|---|---|
| Input Source | Source of the voice message data, can be message ID, direct download URL, or previous node output. |
| Message ID | WhatsApp message ID containing the voice message, required if input source is messageId. |
| Chat ID | WhatsApp chat ID where the message was sent, required if input source is messageId. |
| Download URL | Direct download URL for the voice message, required if input source is downloadUrl. |
| Message ID Field | Field name containing the message ID in previous node data, used if input source is previousNode. |
| Chat ID Field | Field name containing the chat ID in previous node data, used if input source is previousNode. |
| Download URL Field | Field name containing the download URL in previous node data, used if input source is previousNode. |
| Binary Property Name | Name of the binary property to store the voice file. |
| Options.Include Metadata | Whether to include voice message metadata in the output. |
| Options.Custom Filename | Custom filename for the downloaded voice file, supports placeholders {timestamp}, {messageId}, {chatId}. |
Output
Binary
Binary property containing the voice message audio file encoded in base64 with metadata such as mimeType, fileName, and fileExtension.
JSON
success- Indicates if the voice message was successfully downloaded and processed.fileName- The filename of the downloaded voice message audio file.fileSize- Size of the downloaded voice message file in bytes.mimeType- MIME type of the downloaded voice message audio file.metadata- Optional metadata about the voice message such as messageId, chatId, download URL, fileName, fileSize, mimeType, caption, and download timestamp.originalData- Original input data from the previous node, included if input source is previousNode.error- Error message if the download or processing failed.
Dependencies
- Green API credentials (instance ID and API token) for authentication to download voice messages.
Troubleshooting
- If neither a valid download URL nor a message ID with chat ID is provided, the node throws an error indicating missing required data.
- If the message ID does not correspond to a downloadable file, an error is thrown stating no file URL was found for the message.
- Network or authentication issues with the Green API may cause HTTP request failures; ensure credentials are correct and the API is reachable.
- If the custom filename does not include a file extension, the node appends '.ogg' by default to avoid file format issues.