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 send various types of media messages, including documents, images, audio, video, and stickers, directly to WhatsApp users. Specifically, the Send Document operation under the Media resource allows users to send document files to a specified WhatsApp number.

Common scenarios where this node is beneficial include:

  • Sending invoices, contracts, or reports as PDF or other document formats to clients via WhatsApp.
  • Automating delivery of user manuals or guides after a purchase.
  • Sharing official documents or certificates in customer support workflows.

For example, a business can automatically send a purchase receipt document to a customer's WhatsApp number immediately after an order is confirmed.

Properties

Name Meaning
Phone Number The recipient's WhatsApp number including country code (e.g., 5511999999999).
Media URL The URL or base64 string of the document file to be sent.
Filename Optional filename for the document as it will appear to the recipient.
Additional Fields Optional extra settings:
• Reply to Message ID: ID of a message to reply to.
• Delay (seconds): Wait time before sending.
• Disable Link Preview: Whether to disable link previews.
• Mention Users: Comma-separated phone numbers to mention in the message.

Output

The node outputs a JSON object containing the response from the Uazapi API after attempting to send the document. This typically includes status information about the message delivery, message IDs, or error details if the request failed.

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "status": "success",
  "messageId": "abc123def456",
  "details": {
    "recipient": "5511999999999",
    "filename": "document.pdf"
  }
}

If an error occurs, the output JSON will contain an error field describing the issue.

Dependencies

  • Requires an active Uazapi WhatsApp API account with valid credentials including:

    • An API key credential.
    • API token.
    • API base URL.
    • Instance identifier.
  • The node uses these credentials to authenticate requests to the Uazapi service.

  • No additional external dependencies are required beyond the configured credentials.

Troubleshooting

  • Common Issues:

    • Invalid or missing phone number format: Ensure the phone number includes the country code without symbols or spaces.
    • Incorrect or expired API credentials: Verify that the API key, token, and instance ID are correct and active.
    • Invalid media URL or unsupported document format: Confirm the URL is accessible and points to a supported document type.
    • Network connectivity issues preventing API calls.
  • Error Messages:

    • "Unknown resource": Indicates the resource parameter is incorrect; ensure "media" is selected.
    • API authentication errors: Check that all required credentials are properly set.
    • "Failed to send message" or similar: Review the media URL and parameters; check API limits or restrictions.
  • To resolve errors, verify input parameters, credentials, and network access. Use the node’s error output to identify specific problems.

Links and References

Discussion