Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node "Evolution API" provides an interface to interact with the Evolution API, specifically allowing operations on various resources. For the resource Mensaje and operation Enviar Documento, this node sends a document file to a specified recipient via the messaging API. This is useful in scenarios where automated sending of documents (e.g., PDFs, images, or other files) is required as part of workflows, such as sending invoices, reports, or any file attachments directly through a messaging platform.

Practical examples include:

  • Automatically sending a PDF invoice to a customer after a purchase.
  • Dispatching a contract or agreement document to a client for review.
  • Sharing reports or data exports with team members or external contacts.

Properties

Name Meaning
Nombre De La Instancia The name of the instance that will send the document.
Número Del Destinatario The recipient's number or identifier to whom the document will be sent.
Documento The document to send, provided as a URL or base64 encoded string.
Mensaje Optional text message to accompany the document.
Nombre Del Archivo The filename to assign to the document being sent (default: "document.pdf").
Opciones Additional options for sending the message:
- Retraso Delay in milliseconds before the message is sent (default 1200 ms).
- Responder Mensaje Optionally reply to a specific message by providing its ID.
- Menciones Settings to mention users in the message:
-- Mencionar a Todos Boolean to mention all group participants.
-- Números Para Mencionar Comma-separated list of numbers to mention individually (only if not mentioning everyone).

Output

The node outputs a JSON array containing the response from the Evolution API after attempting to send the document. The structure typically includes confirmation details such as message IDs, status, or error information returned by the API.

If the document is sent successfully, the output JSON will confirm the delivery or provide metadata about the sent message.

No binary data output is indicated by the source code or properties.

Dependencies

  • Requires an API key credential for authenticating with the Evolution API.
  • The node expects the Evolution API endpoint https://doc.evolution-api.com/api-reference to be accessible.
  • Proper configuration of the API credentials within n8n is necessary.
  • The document must be accessible either as a valid URL or a base64 encoded string.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect recipient number format may result in message delivery errors.
    • Providing an invalid document URL or malformed base64 string will prevent the document from being sent.
    • Delay values that are too low might cause timing issues in message dispatch.
  • Error messages:

    • "Operação não suportada." indicates that the selected operation is not supported for the chosen resource; verify the resource-operation combination.
    • API errors related to authorization or invalid parameters will be returned from the Evolution API and surfaced in the node output.
  • Resolutions:

    • Ensure API credentials are correctly set up and valid.
    • Validate recipient numbers and document URLs/base64 strings before execution.
    • Use appropriate delay values to avoid race conditions.
    • Check the Evolution API documentation for correct parameter formats.

Links and References

Discussion