Actions64
- Instancia Actions
- Mensagem Actions
- Grupo Actions
- Chat Actions
- Perfil Actions
- Evento Actions
- Integração Actions
Overview
The Procurar Chats operation of the Chat resource in this custom n8n node allows users to search for chat messages within a specific contact's conversation. This is particularly useful for automating workflows that need to retrieve, filter, or process chat history from an external service (presumably Evolution API). Common scenarios include customer support automation, chat analytics, or integrating chat data into other business processes.
Practical Example:
A user wants to find all chat messages exchanged with a particular contact, possibly filtering by message ID and paginating through results for further processing or reporting.
Properties
Below are the supported input properties for this operation:
| Display Name | Type | Meaning |
|---|---|---|
| Nome Da Instância | String | The name of the instance to connect to. Required for identifying which Evolution API instance to use. |
| Contato | String | The contact number (remoteJid) whose chats you want to search. |
| ID Da Mensagem | String | The specific message ID to look for within the chat. |
| Página | Number | The page number for paginated results. |
| Quantidade Por Página | Number | The number of chat messages to return per page (pagination offset). |
Output
The output will be a JSON array containing the chat messages found according to the specified filters. Each item in the array represents a chat message object as returned by the Evolution API. The exact structure depends on the API response, but typically includes fields such as message content, sender, timestamp, and message ID.
Example Output Structure:
[
{
"messageId": "abc123",
"remoteJid": "5511999999999@c.us",
"timestamp": "2024-06-01T12:34:56Z",
"content": "Olá, tudo bem?",
// ...other fields as provided by the API
}
]
Note: The actual fields may vary depending on the Evolution API.
Dependencies
- External Service: Requires access to the Evolution API.
- API Key/Credentials: You must configure valid credentials for the Evolution API in n8n under the credential type
evolutionApi. - n8n Configuration: No special environment variables are required beyond standard credential setup.
Troubleshooting
Common Issues:
Missing or Invalid Credentials:
If the Evolution API credentials are not set up correctly in n8n, the node will fail to authenticate.Unsupported Operation Error:
If the operation or resource is not implemented, you may see an error like:Operação não suportada. A função "find-chats" para o recurso "chat-api" não é suportada!Resolution: Double-check that you have selected the correct resource and operation.
Invalid Input Data:
Providing an incorrect contact number or message ID may result in empty results or errors from the API.Pagination Issues:
Setting the page or quantity per page to invalid values (e.g., negative numbers) may cause errors or unexpected results.