N8N Tools - Uazapi icon

N8N Tools - Uazapi

Complete Uazapi integration - Premium WhatsApp API with advanced messaging and automation

Overview

This node integrates with the Uazapi WhatsApp API to perform various messaging and media-related operations. Specifically, the "Get Media URL" operation under the "Media" resource retrieves a downloadable URL for a given media ID from the WhatsApp instance. This is useful when you want to programmatically access or share media files (images, videos, documents, etc.) that have been previously uploaded or received in WhatsApp conversations.

Practical scenarios include:

  • Automatically fetching media URLs to embed in reports or notifications.
  • Downloading media content for backup or processing.
  • Sharing media links with other systems or users without re-uploading.

Properties

Name Meaning
Additional Fields Optional extra parameters:
- Reply to Message ID: ID of message to reply to
- Delay (seconds): Delay before sending message
- Disable Link Preview: Whether to disable link previews in messages
- Mention Users: Comma-separated phone numbers to mention

Note: For the "Get Media URL" operation, the key input property (not listed in the provided JSON but used in code) is:

Name Meaning
mediaId The identifier of the media to retrieve the download URL for

Output

The node outputs a JSON object containing the response from the Uazapi service. For the "Get Media URL" operation, this JSON will typically include the downloadable URL and related metadata about the requested media file.

Example output structure (simplified):

{
  "url": "https://media-download-link",
  "mediaId": "string",
  "type": "image|video|document|audio|sticker",
  "size": 12345,
  "filename": "optional-filename"
}

No binary data output is indicated for this operation; it returns metadata and URLs only.

Dependencies

  • Requires an active Uazapi WhatsApp API account with valid credentials including:
    • An API key credential for authentication.
    • API token and instance ID for targeting the correct WhatsApp instance.
  • The node uses an HTTP proxy endpoint hosted at https://n8ntools.io/api/v1/proxy/uazapi to forward requests.
  • Proper configuration of these credentials within n8n is necessary for successful operation.

Troubleshooting

  • Common issues:

    • Invalid or expired API tokens or instance IDs may cause authentication failures.
    • Providing an incorrect or non-existent media ID will result in errors or empty responses.
    • Network connectivity problems can prevent reaching the proxy or Uazapi endpoints.
  • Error messages:

    • Errors returned by the API are passed through in the JSON output under an error field if "Continue On Fail" is enabled.
    • Typical error messages might include "Unauthorized", "Media not found", or "Invalid instance".
  • Resolutions:

    • Verify API credentials and refresh tokens if needed.
    • Confirm the media ID exists and is accessible.
    • Check network settings and firewall rules to allow outbound HTTPS traffic.

Links and References

Discussion