Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node "Evolution API" allows users to interact with the Evolution API service. Specifically, for the resource Mensagem and operation Enviar Documento, it enables sending a document file as a message to a specified recipient instance. This is useful in scenarios where automated workflows need to send documents (e.g., PDFs, images, or other files) programmatically via messaging platforms integrated through the Evolution API.

Practical examples include:

  • Sending invoices or contracts automatically to clients.
  • Distributing reports or documentation to team members.
  • Sharing media files as part of customer support or notification systems.

Properties

Name Meaning
Nome Da Instância The name of the instance that will send the document. Required to identify which sender instance to use.
Número Do Destinatário The recipient's number or identifier to whom the document will be sent.
Documento The document content, provided as a URL or base64 string representing the file to send.
Mensagem Optional text message (caption) to accompany the document.
Nome Do Arquivo The filename to assign to the document being sent (default: "document.pdf").
Opções Additional options for sending the message, including:
- Delay Time in milliseconds to wait before sending the message (default 1200 ms).
- Responder Mensagem Option to reply to a specific message by providing its ID.
- Menções Settings to mention participants in group messages:
• Mencionar Todos: Boolean to mention all participants.
• Números Para Mencionar: Comma-separated list of numbers to mention individually.

Output

The node outputs a JSON array containing the response from the Evolution API after attempting to send the document message. The exact structure depends on the API response but typically includes confirmation details such as message IDs, status, timestamps, or error information if the send failed.

If the node supports binary data output (not explicitly shown here), it would represent the document or related media; however, based on the provided code and properties, the output focuses on JSON metadata about the sent message.

Dependencies

  • Requires an active connection to the Evolution API service.
  • Needs an API authentication token or key configured in n8n credentials (referred generically as "an API key credential").
  • Network access to the Evolution API endpoint at https://doc.evolution-api.com/api-reference.

Troubleshooting

  • Common issues:

    • Invalid or missing instance name or recipient number can cause failures.
    • Incorrect document URL or malformed base64 data may result in upload errors.
    • Insufficient permissions or invalid API credentials will prevent sending.
    • Delay option set too low might cause race conditions or API rate limits.
  • Error messages:

    • "Operação não suportada." indicates the requested operation is not implemented or recognized; verify resource and operation names.
    • API errors returned from Evolution API will be passed through; check the API documentation for error codes and meanings.
  • Resolutions:

    • Double-check all required fields are correctly filled.
    • Validate document URLs or base64 strings before sending.
    • Ensure API credentials are valid and have necessary permissions.
    • Adjust delay settings if encountering rate limit or timing issues.

Links and References

Discussion