Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node "Evolution API" provides an interface to interact with the Evolution API service. Specifically, for the Resource "Chat" and Operation "Search Chats" (referred to as "find-chats" in the properties), it allows users to search chat messages or conversations based on specific criteria such as contact number, message ID, pagination, and instance name.

This node is beneficial in scenarios where you need to programmatically retrieve chat data from the Evolution API, for example:

  • Fetching chat history for a particular contact.
  • Searching for a specific message by its ID.
  • Paginating through large sets of chat records.

Practical examples include customer support automation, chat analytics, or integrating chat data into other workflows.

Properties

Name Meaning
Name Da Instância The name of the instance to connect to within the Evolution API.
Contato The contact number (remoteJid) whose chats you want to search.
Message ID The unique identifier of the message to find within the chats.
Página The page number for paginated results (default is 1).
Quantidade Por Página Number of chat records to return per page (pagination size, default is 10).

Output

The node outputs a JSON array containing the search results from the Evolution API. Each item in the array represents a chat or message matching the search criteria. The exact structure depends on the Evolution API response but typically includes details like message content, sender, timestamp, and related metadata.

If the API supports binary data (e.g., media attachments in chats), the node would handle this accordingly, but no explicit binary output handling is indicated in the provided code.

Dependencies

  • Requires an active connection to the Evolution API service.
  • Needs an API authentication credential configured in n8n (an API key or token).
  • The base URL for requests is set to https://doc.evolution-api.com/api-reference.
  • No additional external dependencies are indicated beyond the Evolution API itself.

Troubleshooting

  • Operation Not Supported Error: If you select an unsupported operation or resource, the node throws an error stating the operation is not supported. Ensure that the Resource is "chat-api" and Operation is "find-chats" for searching chats.
  • Missing Required Parameters: The node requires parameters like instance name, contact number, and message ID. Missing these will likely cause errors or empty results.
  • API Connectivity Issues: Network problems or invalid API credentials can cause request failures. Verify your API key and network access.
  • Pagination Misconfiguration: Setting page or offset values incorrectly may result in unexpected or empty results.

Links and References

Discussion