Avisa App icon

Avisa App

Consume Avisa App API

Actions3

Overview

This node integrates with the Avisa App API to send different types of messages via a messaging platform. Specifically, it supports sending text messages, documents, and images to phone numbers in international format.

For the Send Document operation, the node allows users to send a base64-encoded document file along with an optional caption to a specified phone number. This is useful for automating the distribution of files such as PDFs, Word documents, or other attachments directly through messaging channels.

Practical examples:

  • Sending invoices or receipts as PDF documents to customers.
  • Distributing contracts or forms that need to be reviewed or signed.
  • Sharing brochures or product catalogs in document format.

Properties

Name Meaning
Phone Number The recipient's phone number in international format (e.g., +1234567890).
Document The document content encoded in Base64 format to be sent.
File Name The name of the file being sent, including extension (e.g., invoice.pdf).
Caption Optional text caption describing or accompanying the document.

Output

The node outputs a JSON array where each element corresponds to the response from the Avisa App API for each input item processed.

The json output field contains the full API response object returned after attempting to send the document message. This typically includes status information about the message delivery.

The node does not output binary data; all document content is sent as Base64-encoded strings within the request body.

Dependencies

  • Requires an active connection to the Avisa App API.
  • 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/sendDocument on the Avisa App API.

Troubleshooting

  • Common issues:

    • Invalid or missing API token will cause authorization failures.
    • Incorrectly formatted phone numbers may result in message delivery errors.
    • Improper Base64 encoding of the document can cause the API to reject the file.
    • Missing required properties like document or fileName will prevent successful requests.
  • Error messages:

    • Authorization errors usually indicate invalid or expired API tokens; verify and update credentials.
    • Validation errors from the API may specify which property is incorrect or missing.
    • Network or connectivity errors suggest checking internet access or API availability.
  • To handle errors gracefully, enable "Continue On Fail" in the node settings to process subsequent items even if some fail.

Links and References

Discussion