n8n polling workflow for local leads
Use HTTP Request nodes with the existing customer API to create a search, wait for completion, and download full CSV. No native n8n plugin or webhook is required.
OwnerClue · Updated
Download and configure the workflow
Download the n8n JSON template and import it into your n8n instance. It is a polling recipe for the current API, not a native OwnerClue integration. The JSON has been checked locally; it has not been executed against a paid production task in an n8n account.
- Create an OwnerClue key with leads:read and leads:write.
- In n8n, create a Header Auth credential named as you prefer, with header Authorization and value Bearer plus your key. Select it on Create search, Read status and Download CSV.
- In Configure, set apiBase, keyword and a real locationCode from the location endpoint. The template uses 0 as an intentional placeholder.
- Keep depth at 20 or lower if using only the 20-credit trial and no other work has consumed it.
- Run manually. The CSV appears as binary data on Download CSV after completion.
The official n8n HTTP Request documentation explains credential selection and response formats.
Polling and retry behavior
Create search sends a per-execution idempotency key and saves data.id. Wait delays each poll by five seconds. Read status uses that original ID. Completed goes to CSV download; failed, paused, cancelled or stopped stops for inspection; other states wait again. The workflow has a 30-minute execution timeout to bound waiting. HTTP failures stop the run; inspect the response and retry only after fixing its cause.
If creation returned 202 but you lost its response, retry the unchanged POST using the same idempotency key. Do not rerun a new n8n execution with a new key merely to retrieve an existing task: save the ID and poll that task instead.
Results pagination if you need JSON
The download branch asks for full CSV and lets the existing export stream deliver all rows. To use JSON instead, GET /searches/{id}/results?limit=100, save data.items, then repeat with data.nextCursor until it is null. Keep limit constant and read after completion. Do not treat only the first page as the complete list.
Use the same shape for /campaigns/{id} or /enrichments/{id}, changing the create body and endpoints accordingly. Enrichment input remains at most 100 rows per API task. This template does not add CRM sync, mailbox validation or a completion webhook.