CustomJE icon

CustomJE

Custom operations

Overview

This node operation, Get Whatsapp Media, allows you to retrieve media files sent or received via WhatsApp by providing specific identifiers and URLs related to the media. It is useful in scenarios where you want to programmatically download or process WhatsApp media such as images, videos, audio, or documents within an automation workflow.

Practical examples include:

  • Automatically downloading and archiving WhatsApp images shared in a customer support chat.
  • Processing video or audio messages for transcription or analysis.
  • Fetching document files sent over WhatsApp for further processing or storage.

The node sends a request to a custom API endpoint with the necessary parameters to fetch the media content.

Properties

Name Meaning
CJ Token Your CJ Token (an API key credential) required to authenticate the request.
Media Key The unique WhatsApp media key identifying the specific media file to retrieve.
URL The WhatsApp media URL pointing to the location of the media file.
Media Type The type of media file to retrieve. Options: Audio, Document, Image, Video.
Message ID The WhatsApp message ID associated with the media file.

Output

The output is a JSON object containing the response from the custom API that handles WhatsApp media retrieval. This typically includes metadata about the media and possibly the media content itself encoded or referenced.

If the media content is binary (e.g., image, audio, video), it may be included in the response or accessible via a returned URL. The exact structure depends on the external API's response format but generally provides all necessary information to access or download the media.

Dependencies

  • Requires a valid CJ Token (API key) for authentication with the external custom API service.
  • Depends on the external API endpoint https://api.customje.com/whatsapp-media-api.php to fetch WhatsApp media.
  • No additional n8n credentials or environment variables are explicitly required beyond the provided API key.

Troubleshooting

  • Invalid or missing CJ Token: Ensure the API key is correctly entered and active; otherwise, authentication will fail.
  • Incorrect Media Key, URL, or Message ID: Double-check these values as incorrect identifiers will cause the API to return errors or no data.
  • Unsupported Media Type: Confirm the media type matches the actual media being requested; mismatches might lead to failed retrieval.
  • Network or API downtime: If the external API is unreachable, the node will throw an error. Verify network connectivity and API status.
  • Error messages from the API: These will be passed through in the node’s output. Review the error details to adjust parameters accordingly.

Links and References

Discussion