Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node "Evolution API" provides integration with the Evolution API service, allowing users to perform various operations on different resources. Specifically, for the Chat resource and the Buscar Mensajes (Find Messages) operation, the node enables retrieving chat messages from a specified contact within an instance. This is useful for scenarios where you want to programmatically access chat history, paginate through messages, or analyze conversations.

Practical examples include:

  • Fetching recent messages from a customer support chat to analyze user queries.
  • Paginating through chat logs for archival or compliance purposes.
  • Integrating chat data into other workflows or databases for further processing.

Properties

Name Meaning
Nombre De La Instancia The name of the Evolution API instance to connect to.
Contacto The contact number (remote JID) whose messages you want to retrieve.
Página The page number of the message list to fetch (used for pagination).
Cantidad Por Página The number of messages to retrieve per page (page size).

Output

The node outputs a JSON array where each element represents a message retrieved from the specified contact in the given instance. Each message object typically contains details such as message content, timestamp, sender information, and any metadata provided by the Evolution API.

If the API supports binary data (e.g., media attachments), those would be included in the output accordingly, but based on the provided code and properties, the primary output is structured JSON message data.

Dependencies

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

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-messages".
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key or token is correctly configured.
  • Invalid Parameters: Providing incorrect instance names or contact numbers may result in empty results or errors. Double-check input values.
  • Pagination Issues: Requesting pages beyond the available range may return empty arrays. Adjust the page and offset parameters accordingly.

Links and References

Discussion