Actions9
- Contact Actions
- Group Actions
- Message Actions
- Webhook Actions
Overview
This node integrates with the Avisa API to send various types of WhatsApp messages programmatically. Specifically, for the Message resource and Send Document operation, it allows sending a document file encoded in Base64 format to a specified phone number via WhatsApp.
Common scenarios where this node is beneficial include:
- Automating the distribution of invoices, contracts, or reports as documents to clients.
- Sending user manuals or product datasheets directly through WhatsApp.
- Delivering official documents or certificates securely in an automated workflow.
Example use case: A business wants to automatically send purchase receipts as PDF documents to customers after a transaction completes. This node can be configured to send the receipt document to the customer's WhatsApp number.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The recipient's phone number in international format (e.g., +1234567890). |
| Document (Base64) | The document file content encoded as a Base64 string. |
| File Name | The name of the document file including extension (e.g., invoice.pdf). |
| Message | Optional text message to accompany the document when sent. |
Output
The node outputs a JSON array where each element corresponds to the response from the Avisa API for each input item processed.
The JSON output typically contains:
- Success status of the request.
- Any returned data or error messages from the API.
No binary data is output by this node; all responses are JSON objects representing the API result.
Dependencies
- Requires an active connection to the Avisa API service.
- Needs an API authentication token credential configured in n8n to authorize requests.
- The base URL for the API is taken from the credential configuration.
- HTTP POST requests are made to the endpoint
/actions/sendDocumentwith appropriate headers.
Troubleshooting
Common issues:
- Invalid or missing API token will cause authorization errors.
- Incorrect phone number format may lead to failed delivery.
- Improperly encoded Base64 document content can cause the API to reject the request.
- Network timeouts or connectivity issues with the Avisa API server.
Error messages:
400 Bad Requestor401 Unauthorized: Usually indicates invalid input parameters or authentication failure. Verify the API token and input fields.- Error responses include descriptive messages from the API which are passed through in the output for debugging.
Resolution tips:
- Ensure the API token credential is correctly set up and valid.
- Confirm the phone number is in the correct international format.
- Validate that the document content is properly Base64 encoded.
- Increase timeout settings if large documents cause delays.
Links and References
- Avisa API Documentation (hypothetical link, replace with actual if available)
- WhatsApp Business API Guidelines
- Base64 Encoding Reference
Note: This summary is based on static analysis of the provided source code and property definitions without runtime execution.