Evolution API icon

Evolution API

Interact with Evolution API

Overview

This node, named "Evolution API," is designed to interact with the Evolution API service. Specifically, for the Chat resource and the Buscar Chats (Find Chats) operation, it allows users to search for chat messages within a specified contact's conversation on a given instance. This can be useful in scenarios where you want to retrieve historical chat data, audit conversations, or integrate chat logs into other workflows.

Practical examples include:

  • Fetching recent messages from a specific contact for customer support analysis.
  • Retrieving chat history for compliance or record-keeping.
  • Integrating chat data into CRM or analytics platforms.

Properties

Name Meaning
Nombre De La Instancia The name of the instance where the chat data resides. Required to identify the source.
Contacto The contact number (remote JID) whose chats are being searched.
ID Del Mensaje The specific message ID to locate within the chat history.
Página The page number of results to fetch, used for pagination. Defaults to 1.
Cantidad Por Página The number of chat entries to return per page. Defaults to 10.

Output

The node outputs an array of JSON objects representing the chat messages found based on the input parameters. Each object corresponds to a chat message or related chat data retrieved from the Evolution API.

If the API supports binary data (e.g., media files in chats), this node would typically include such data in a binary property; however, based on the provided code and properties, the output focuses on JSON-formatted chat information.

Dependencies

  • Requires an API key credential for authenticating with the Evolution API service.
  • The node uses the base URL https://doc.evolution-api.com/api-reference as the API endpoint.
  • Proper configuration of the API credential in n8n is necessary for successful requests.

Troubleshooting

  • Operation Not Supported Error: If you select an unsupported operation or resource, the node throws an error indicating the operation is not supported. Ensure that the resource is set to "chat-api" and the operation to "find-chats" when searching chats.
  • Missing Required Parameters: The node requires certain parameters like instance name, contact number, and message ID. Omitting these will likely cause errors or empty results.
  • API Authentication Issues: Invalid or missing API credentials will prevent the node from connecting to the Evolution API. Verify that the API key is correctly configured.
  • Pagination Limits: Requesting pages beyond available data may return empty arrays. Adjust the page and offset values accordingly.

Links and References

Discussion