ZapClass API icon

ZapClass API

Integração com a API do ZapClass para envio de mensagens WhatsApp

Mensagem → Baixar Arquivo

AI-generated

Overview

This node integrates with the ZapClass API to download a file from a WhatsApp message. It is useful for scenarios where users need to retrieve media files sent or received in WhatsApp conversations, such as images, audio, or documents. For example, it can be used to automatically download and process audio files for transcription or save media files to a public URL for sharing.

Use Case Examples

  1. Downloading an audio file from a WhatsApp message and converting it to MP3 format.
  2. Retrieving a document from a cited message in a WhatsApp conversation.
  3. Saving a media file to a public URL and optionally encoding it in base64 for further processing.

Properties

Name Meaning
Message ID Identifier of the WhatsApp message containing the file to download. This is a required string input.
Additional Options Optional settings to customize the file download behavior, including encoding the file content in base64, saving and returning a public URL, choosing audio format (MP3 or OGG), providing an OpenAI API key for audio-to-text transcription, and specifying whether to download media from a quoted message instead of the main message.

Output

JSON

  • fileContent - The downloaded file content, optionally encoded in base64 if requested.
  • publicUrl - A public URL to access the saved file if the link option is enabled.
  • audioFormat - Indicates the audio format used (MP3 or OGG) if the file is audio.
  • transcription - Text transcription of the audio file if OpenAI API key is provided and transcription is performed.

Dependencies

  • ZapClass API for WhatsApp integration
  • Optional OpenAI API for audio-to-text transcription

Troubleshooting

  • Ensure the Message ID is correct and corresponds to a message containing a downloadable file.
  • If the file is not downloading, check API credentials and network connectivity.
  • If transcription fails, verify the OpenAI API key is valid and has sufficient permissions.
  • If the public URL is not returned, confirm that the link option is enabled and the API supports file hosting.

Discussion