Whaapy icon

Whaapy

WhatsApp Business API with AI - Send messages, manage conversations, and automate with AI agents

Contact → Search

AI-generated

Summary

Searches Whaapy contacts by a text query, with optional JSON filters, by POSTing to the /contacts/v1/search endpoint. It returns one n8n item per matching contact and can page through all results automatically.

Inputs

  • searchQuery (required) — Search text, sent as query in the POST body.
  • searchOptions.filters — JSON object of extra filters, sent as filters in the body. A string is parsed with JSON.parse, so invalid JSON causes an error. Omitted if empty.
  • returnAll — If true, follows pagination.next_cursor and fetches every page, up to 200 requests with a 100 ms interval between them. Default false.
  • limit — Max results when Return All is off (1-100, default 20). It is sent as limit in the body.
  • limit (Page Size) — Shown when Return All is on. It sets the number of results per page (1-100, default 100).

Output shape

A list of n8n items, one per matching contact. Each item's json is a contact object taken from the response's data array, or from contacts if data is absent.

With Return All off, only a single page of up to limit contacts is returned. With Return All on, pages are concatenated, and the cursor is sent in the request body. An empty result set produces no items. The node runs once per input item. If Continue On Fail is enabled, a failed item yields {error: message} instead of stopping the workflow.

Examples

Example 1: Find contacts matching a name or phone fragment and fetch the first 20

Search Query = "Juan"; Return All = false; Limit = 20

Example 2: Export every contact matching a query, filtered by tag

Search Query = "maria"; Search Options > Filters = {"tags":["vip"]}; Return All = true; Page Size = 100. The filter keys are an assumption, so check the Whaapy API docs for the supported fields.

Links

Discussion