N8N Tools - WhatsApp Enhanced icon

N8N Tools - WhatsApp Enhanced

Comprehensive WhatsApp Business API integration for N8N workflows

Overview

This node integrates with the WhatsApp Business API via the N8N Tools platform, enabling users to send various types of WhatsApp messages programmatically within n8n workflows. Specifically, the "Send Document Message" operation under the "Messages" resource allows sending a document file to a specified phone number on WhatsApp.

Common scenarios for this node include:

  • Sending invoices, contracts, or PDFs directly to customers.
  • Sharing brochures or product catalogs as documents.
  • Automating document delivery in customer support or sales processes.

For example, a business can automate sending a PDF brochure to new leads by providing the phone number, media ID of the uploaded document, filename, and an optional caption.

Properties

Name Meaning
Phone Number The recipient's phone number in international format (e.g., 5511999999999).
Media ID The unique identifier of the document media stored in WhatsApp (must be previously uploaded).
Caption Optional text caption to accompany the document message.
Filename The name of the document file being sent (e.g., "invoice.pdf").

Output

The node outputs JSON data representing the response from the WhatsApp API after attempting to send the document message. This typically includes message status, IDs, timestamps, or error information if the request failed.

No binary data output is produced by this operation.

Dependencies

  • Requires valid credentials for the N8N Tools API, including an API key and OAuth2 token for WhatsApp.
  • The document media must already be uploaded to WhatsApp, and its Media ID provided.
  • The node performs an initial validation call to the N8N Tools API to verify subscription and API key validity before sending messages.

Troubleshooting

  • Invalid API Key or Subscription: If the node throws an error about invalid subscription or API key, verify that your credentials are correct and active.
  • Media ID Not Found: Ensure the Media ID corresponds to an existing uploaded document in WhatsApp; otherwise, the message will fail.
  • Incorrect Phone Number Format: Phone numbers must be in international format without spaces or special characters.
  • Missing Required Fields: The operation requires phoneNumber, mediaId, and filename. Omitting any will cause errors.
  • API Rate Limits or Quotas: Excessive requests may lead to throttling; monitor usage accordingly.

Links and References

Discussion