Green API Get Voice

Download and process WhatsApp voice messages via Green API

Overview

This node interacts with the Green API to handle WhatsApp voice messages. It supports two main operations: retrieving the download URL for a voice message and downloading the voice message file itself. This is useful for automating workflows that involve processing or storing WhatsApp voice messages, such as archiving messages, analyzing audio content, or integrating voice messages into other systems.

Use Case Examples

  1. Automatically fetch the download URL of a WhatsApp voice message for further processing.
  2. Download a WhatsApp voice message and save it as binary data within the workflow for storage or playback.

Properties

Name Meaning
Chat ID The WhatsApp chat identifier where the voice message was sent. Required to specify the source chat.
Message ID The unique identifier of the voice message to download or get the URL for. Required to specify the exact message.

Output

Binary

Contains the voice message audio data encoded in base64 when the 'Download Voice Message' operation is used with 'Save as Binary' enabled.

JSON

  • downloadUrl - The URL from which the voice message can be downloaded.
  • mimeType - The MIME type of the voice message audio file, typically 'audio/ogg'.
  • fileName - The suggested filename for the voice message audio file.
  • fileSize - The size of the downloaded voice message file in bytes (only present when the file is downloaded).
  • chatId - The chat ID where the voice message was sent.
  • messageId - The ID of the voice message.
  • downloaded - Boolean indicating if the voice message file was successfully downloaded.
  • error - Error message if the operation failed (present only on failure).
  • operation - The operation being performed when an error occurred.

Dependencies

  • Green API service for WhatsApp integration, requiring credentials including an instance ID and API token.

Troubleshooting

  • If no download URL is received, the node throws an error indicating the voice message URL could not be retrieved. Verify the chat ID and message ID are correct and that the Green API credentials are valid.
  • Network or authentication errors may occur if the API token or instance ID is incorrect or expired. Ensure credentials are up to date.
  • If the 'Save as Binary' option is enabled but the download fails, the node will throw an error. Check network connectivity and API response.

Links

Discussion