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 users to send documents as messages. The "Enviar Documento" (Send Document) operation under the "Mensagem" (Message) resource enables sending a document file to a specified recipient via an instance of the Evolution service.

This node is useful in scenarios where automated workflows need to deliver files such as PDFs, images, or other documents directly to users or groups through the Evolution messaging platform. For example, it can be used to send invoices, reports, contracts, or any important document automatically triggered by events in other systems.

Properties

Name Meaning
Nome Da Instância The name of the Evolution instance that will send the document.
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 be sent.
Mensagem Optional text message to accompany the document.
Nome Do Arquivo The filename for the document being sent; defaults to "document.pdf".
Opções Additional options for sending the message:
- Delay Time delay in milliseconds before the message is sent (default 1200 ms).
- Responder Mensagem Option to reply to a specific message by providing its ID.
- Menções Settings to mention participants in the message: either mention all or specify individual numbers separated by commas.

Output

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

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 and authentication to be configured properly within n8n credentials.
  • No additional external dependencies are explicitly required beyond the Evolution API access.

Troubleshooting

  • Common Issues:

    • Invalid or missing instance name or recipient number may cause the API call to fail.
    • Incorrect document URL or malformed base64 string can result in upload errors.
    • Insufficient permissions or invalid API key will lead to authentication errors.
    • Delay option set too low might cause race conditions or message ordering issues.
  • Error Messages:

    • "Operação não suportada." indicates the requested operation is not implemented or recognized.
    • API errors returned from Evolution API should be checked for detailed failure reasons.
  • Resolutions:

    • Verify all required fields are correctly filled.
    • Ensure the document content is accessible and correctly formatted.
    • Confirm API credentials are valid and have necessary permissions.
    • Adjust delay settings if messages are sent too quickly.

Links and References

  • Evolution API official documentation (not provided here, but recommended to consult for detailed API usage)
  • n8n documentation on creating and using custom nodes and credentials

Discussion