Actions83
- Instances Actions
- Client Actions
- Message Actions
- Chat Actions
- Contact Actions
- Number Actions
- Group Actions
- Channel Actions
- Label Actions
- Story Actions
Overview
The node provides functionality to search messages within a messaging platform using the WaAPI API. It allows users to query messages by text content and specify additional options such as chat ID, pagination page, and result limit. This is useful for scenarios where you want to filter or find specific messages in chats, for example, retrieving all messages containing a keyword like "hello" from a particular chat.
Practical examples:
- Searching customer support chat logs for messages containing certain keywords.
- Filtering group chat messages to find mentions of a topic.
- Retrieving paginated message results for analysis or reporting.
Properties
| Name | Meaning |
|---|---|
| Id | Instance ID (a required numeric identifier for the instance). |
| Query | Text string to search for within messages (e.g., "hello"). |
| Options | JSON object with optional parameters: chatId (string, e.g., "123456789@c.us"), page (number, e.g., 1), and limit (number, e.g., 10) to control which chat to search and pagination details. |
Output
The output contains a JSON field with the search results of messages matching the query criteria. The structure typically includes an array of message objects that meet the search conditions, including metadata such as message content, sender, timestamp, and chat information.
If binary data were involved (e.g., media attachments), it would be summarized here, but this operation focuses on textual message search results only.
Dependencies
- Requires an API key credential for authenticating with the WaAPI service.
- The node uses the WaAPI REST API endpoint at
https://waapi.app/api/v1. - No other external dependencies are indicated.
Troubleshooting
- Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrect
Idor malformedOptionsJSON may lead to request errors. - Searching with an empty or invalid
Querystring might return no results or errors.
- Error messages:
- Authentication errors: Ensure the API key credential is correctly configured.
- Validation errors: Check that required fields (
Id,Query) are provided and valid. - API response errors: Verify that the
chatIdexists and the pagination parameters are within allowed ranges.
Links and References
- WaAPI Official Documentation
- n8n HTTP Request Node Documentation (for understanding API calls)
- JSON Pagination Best Practices