Actions37
- Message Actions
- Media Actions
- Contact Actions
- Group Actions
- Instance Actions
- Webhook Actions
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:
- Automating the delivery of invoices, contracts, or reports as PDF or other document formats via WhatsApp.
- Sending user manuals or guides in document form during customer support interactions.
- Distributing official forms or certificates securely through WhatsApp messaging.
For example, a business can automatically send a purchase receipt document to a customer’s WhatsApp number after an online transaction completes.
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 WhatsApp API after attempting to send the document. This typically includes status information about the message delivery, message IDs, timestamps, or error details if the request failed.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"status": "success",
"messageId": "abc123xyz",
"timestamp": "2024-06-01T12:00:00Z"
}
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:
- API key credential
- API token
- API base URL
- Instance ID for the WhatsApp instance
- These credentials must be configured in n8n prior to using the node.
- The node sends requests through a proxy endpoint hosted at
https://n8ntools.io/api/v1/proxy/uazapi.
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.
- Media URL inaccessible or invalid: Confirm the document URL is publicly accessible or correctly encoded in base64.
- Network connectivity issues to the proxy or Uazapi endpoints.
Error Messages:
"Unauthorized"or"Invalid API key": Check API credentials and permissions."Media not found"or"Invalid media URL": Validate the media URL or base64 content."Instance not found": Confirm the instance ID corresponds to an active WhatsApp instance."Rate limit exceeded": Reduce message sending frequency or contact Uazapi support.
To resolve errors, verify all input parameters, credentials, and network access. Use the error message returned in the output JSON for guidance.
Links and References
- Uazapi Official Documentation (for detailed API capabilities)
- WhatsApp Business API Overview
- n8n Documentation on Credentials
- n8n HTTP Request Node (for understanding underlying HTTP calls)