Evolution API Direct icon

Evolution API Direct

Interact with Evolution API using direct URL and API Key

Overview

The node "Evolution API Direct" allows users to interact with the Evolution API by specifying a direct server URL and an API key. It supports various resources and operations, including the "Chat" resource with the "Procurar Mensagens" (Find Messages) operation. This operation enables users to search for chat messages from a specific contact on a given instance of the Evolution API.

Typical use cases include:

  • Retrieving chat history or messages exchanged with a particular contact.
  • Paginating through messages by specifying page number and number of messages per page.
  • Integrating Evolution API chat data into workflows for monitoring or analysis.

For example, a user can configure the node to connect to their Evolution API instance, specify a contact's number, and fetch the latest 10 messages from that contact.

Properties

Name Meaning
Server URL The full URL of your Evolution API server (e.g., https://api.exemplo.com).
API Key The API key credential for authenticating requests to the Evolution API instance.
Nome Da Instância The name of the Evolution API instance you want to query.
Contato The phone number or identifier of the contact whose messages you want to find.
Página The page number of results to retrieve (used for pagination).
Quantidade Por Página Number of messages to return per page (pagination size).

Output

The node outputs a JSON array where each element represents a message retrieved from the Evolution API based on the specified contact and pagination parameters. Each message object typically contains details such as message content, timestamp, sender/receiver info, and other metadata provided by the API.

If the API supports binary data (e.g., media attachments in messages), the node would handle it accordingly, but this is not explicitly detailed in the provided code.

Dependencies

  • Requires access to an Evolution API server reachable via the specified Server URL.
  • Needs a valid API key credential for authentication.
  • The node depends on the Evolution API's chat endpoints to perform message searches.
  • No additional external libraries beyond n8n core modules are indicated.

Troubleshooting

  • Operation Not Supported Error: If the node throws an error stating the operation is not supported, verify that the Resource is set to "chat-api" and Operation to "find-messages". Also ensure the implementation supports these values.
  • Authentication Failures: Incorrect or missing API key will cause authorization errors. Double-check the API key and instance name.
  • Invalid Server URL: Ensure the Server URL is correct and accessible from the n8n environment.
  • Pagination Issues: Providing invalid page numbers or offsets may result in empty responses or errors. Use positive integers for these properties.

Links and References

Discussion