Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node named "Evolution API" provides an interface to interact with the Evolution API service. Specifically, for the Resource "Chat" and Operation "Search Chats," it allows users to search chat messages within a specified contact's conversation. This is useful in scenarios where you want to retrieve historical chat data, filter chats by message ID, or paginate through chat records.

Practical examples include:

  • Fetching recent chat messages from a particular contact.
  • Searching for a specific message by its ID within a chat.
  • Paginating through large volumes of chat history for analysis or export.

Properties

Name Meaning
Instance Name The name of the Evolution API instance to connect to.
Contact The contact number (remote JID) whose chats are being searched.
Message ID The unique identifier of the message to find within the chat.
Page The page number of the results to retrieve (for pagination).
Items Per Page The number of chat items to return per page (pagination size).

Output

The node outputs a JSON array containing the search results of chat messages matching the criteria. Each item in the output array represents a chat message or chat record retrieved from the Evolution API based on the input parameters.

If the node supports binary data output (not explicitly shown in the provided code), it would typically represent attachments or media files associated with chat messages. However, no explicit binary output handling is visible in the given source.

Dependencies

  • Requires an active connection to the Evolution API service.
  • Needs an API authentication credential configured in n8n to authorize requests.
  • The base URL for API requests is set to https://doc.evolution-api.com/api-reference.
  • No other external dependencies or environment variables are indicated.

Troubleshooting

  • Operation not supported error: If the selected operation or resource is not implemented, the node throws an error stating the function is unsupported. Ensure that the Resource is set to "chat-api" and Operation to "find-chats" as per the available implementation.
  • Missing required parameters: The node requires certain parameters like Instance Name, Contact, and Message ID. Omitting these will likely cause errors or empty results.
  • API connectivity issues: Network problems or invalid API credentials can cause request failures. Verify API keys and network access.
  • Pagination parameters: Providing invalid page numbers or offsets may result in unexpected or empty responses.

Links and References

Discussion