Skip to content

Use Klozeo in your n8n workflows

If you’re running n8n workflows that push leads into Airtable, you’ve hit this wall: Airtable works fine as a read source, but writing back — updating a field after an enrichment step, marking a lead as qualified after a scoring run — is fragile. You’re fighting rate limits, patchy UPSERT support, and an API that wasn’t designed for programmatic deduplication.

Klozeo is a REST API built specifically for this. Same HTTP Request nodes in n8n, no SQL required, deduplication on every write.


Add an X-API-Key header to every request. Get your key from the dashboard under API Keys.

In n8n, store it as a Credential (HTTP Header Auth):

FieldValue
NameX-API-Key
Valuesk_live_...

POST /leads runs deduplication before every insert. If a lead with the same email already exists, it merges instead of creating a duplicate — and returns the existing lead’s ID.

n8n HTTP Request node:

SettingValue
MethodPOST
URLhttps://api.klozeo.com/api/v1/leads
AuthHTTP Header Auth (your credential)
BodyJSON
{
"name": "{{ $json.company_name }}",
"source": "n8n-webhook",
"email": "{{ $json.email }}",
"city": "{{ $json.city }}",
"source_id": "{{ $json.external_id }}"
}

Use source_id to pass your external system’s ID — Klozeo uses it as a second dedup key. Safe to call on every workflow run.

Response when created (201):

{ "id": "cl_...", "message": "Lead created successfully" }

Response when merged (200):

{ "id": "cl_existing...", "message": "Duplicate detected, existing lead updated", "duplicate": true }

Either way, id is valid and you can use it in downstream nodes.


Once you have a cl_ ID — from a previous create step, a webhook, or a lookup — you can patch any field:

PUT https://api.klozeo.com/api/v1/leads/{{ $json.id }}
{
"status": "qualified",
"rating": 4.5
}

Only include fields you want to change. status accepts: new, contacted, qualified, disqualified, converted.

This is the write-back that Airtable makes painful. One node, no workarounds.


GET https://api.klozeo.com/api/v1/leads?filter=and.eq.status.new&filter=and.gte.score.60&limit=100

Filter format: logic.operator.field.value. Chain multiple filter params with &.

Common operators: eq, neq, gt, gte, lt, lte, contains, is_empty, not_empty.

In n8n, set the URL with Query Parameters in the node:

ParameterValue
filterand.eq.status.new
filterand.gte.score.60
limit100

n8n sends both filter params — Klozeo combines them with AND logic.

Paginate with cursor from the response’s next_cursor field. Use a Loop node + an IF node on has_more to walk all pages.


If you’re importing a list — form submissions, scraped data, a CSV — use batch create:

POST https://api.klozeo.com/api/v1/leads/batch
{
"leads": [
{ "name": "Acme", "source": "import", "email": "contact@acme.com" },
{ "name": "Globex", "source": "import", "email": "info@globex.com" }
]
}

Up to 100 leads per request (Free) or 500 (Pro). Check the errors array in the response — a 207 Multi-Status means some failed, not all.


Option 1 — CSV import (quickest)

  1. Export your Airtable base as CSV.
  2. In Klozeo: Import → upload the CSV → map your columns.
  3. Deduplication runs on every row — safe to re-import if you’re unsure.

Option 2 — n8n workflow

Useful if you want to migrate incrementally or keep both in sync during a transition.

  1. Airtable node → list all records.
  2. Split In Batches (100 at a time).
  3. HTTP RequestPOST /leads/batch to Klozeo.
  4. Optional: store the Airtable record ID in source_id so Klozeo can match them on future runs.

Switching Klozeo in as your write target:

  • Dedup on every write — no more UPSERT gymnastics or checking-then-inserting in two nodes.
  • Write-back without friction — update status, rating, or any field from any point in your workflow.
  • Scoring rules — define expressions once, scores update automatically on every lead change. No formula columns to maintain.
  • Webhooks — subscribe to lead.created, lead.updated etc. to trigger downstream workflows instead of polling.

API Reference — Leads · Filtering guide · Scoring Rules