How-to
n8n Data Tables: Stop Duplicate Leads and Avoid the Storage Wall (Tested, 2026)
Some links below are affiliate links. If you buy through them we may earn a commission at no extra cost to you. It doesn't change our test results. How we make money.
Tested November 13, 2026 on n8n 2.44.6 Community Edition on our own test server: once on n8n's default SQLite database, and once on PostgreSQL 17.5. Setup follows n8n's docs for Data tables, the Data Table node and concurrency control. Plan details checked the same day on n8n.io/pricing. We couldn't test n8n Cloud for this one (our trial has ended).
n8n's Data Tables give you a spreadsheet-like table inside n8n, so a small business can keep a lead list, a "who have we already emailed" list or a stock lookup without paying for Airtable or setting up a database. We use one in our quote request form build.
Two things decide whether that's safe for real customer data: does it stop duplicates when leads arrive at the same moment, and what happens when the table fills up? We tested both. We sent almost 4,000 webhook runs through four test workflows, in bursts of 2, 5, 10, 25 and 50 identical submissions, then filled two instances to their storage limit.
Short version:
- Don't build "check if the email exists, then insert." It's the obvious design and it works when leads arrive one at a time. In bursts of 10 or more identical submissions, it saved duplicates in 48 of 52 bursts. On Postgres, all 25 copies were saved in every one of 13 bursts of 25.
- Use the Data Table node's Upsert operation instead. On n8n's default SQLite database it saved exactly one row in every burst we sent: 82 bursts, up to 25 at once. On Postgres it let a second copy through in 15 of 26 bursts of 10 or 25.
- If your n8n runs on Postgres and bursts can happen, set
N8N_CONCURRENCY_PRODUCTION_LIMIT=1(25 queued leads still finished in about a second) or keep the lead list in a real Postgres table with a unique email rule. That rule gave 0 duplicates in 30 bursts of up to 50. - The storage limit fails quietly. It's 200 MiB by default, which works out to roughly a million lead rows of the shape we tested. Once you're over it, every insert and upsert fails, but a form posting to a webhook that replies straight away still gets a 200 "Workflow was started". The lead is gone. On Postgres, deleting half the rows didn't free the space; we needed
VACUUM FULL.
Why duplicates happen
A human double-clicking Send isn't the problem. Two identical submissions at the same moment never duplicated in our tests: 0 of 112 pairs across both databases and both builds below, and 0 of 52 bursts of 5.
The risk is bigger bursts: a script or app that sends a batch, a sender retrying after an outage, or a backfill of old leads. Each submission starts its own workflow run, and n8n runs them side by side unless you limit it. Duplicates matter because everything downstream runs twice: two welcome emails, two CRM contacts, two "new lead" alerts.
Test 1: "check, then insert" lets duplicates through
This is the build most people make, and n8n's If Row Does Not Exist operation makes it a two-node job. A webhook receives the lead, Is this email new? passes it on only if no row has that email, and Save lead inserts it.

Sent one at a time (10 posts with the same email, 1.5 seconds apart), it worked on both databases: one row each. Then we sent identical submissions all at once:
| Simultaneous copies | SQLite: bursts with duplicates | Postgres: bursts with duplicates |
|---|---|---|
| 2 | 0 of 43 | 0 of 13 |
| 5 | 0 of 13 | 0 of 13 |
| 10 | 12 of 13 (up to 5 rows) | 10 of 13 (up to 6 rows) |
| 25 | 13 of 13 (5 to 22 rows) | 13 of 13 (25 rows every time) |
Every run finished with status "success". Nothing in the executions list tells you it happened. You only see it in the table.

The cause is timing. Each run checks the table before any of the others has saved its row, so several of them see "email is new" and all insert. There's no unique rule on a Data Table column to stop the second insert.
Test 2: Upsert holds on SQLite, mostly holds on Postgres
The Data Table node's Upsert operation does the check and the save in one step: if a row matches your condition it's updated, otherwise a new row is added.

| Simultaneous copies | SQLite: bursts with duplicates | Postgres: bursts with duplicates |
|---|---|---|
| 2 | 0 of 43 | 0 of 13 |
| 5 | 0 of 13 | 0 of 13 |
| 10 | 0 of 13 | 6 of 13 (2 rows) |
| 25 | 0 of 13 | 9 of 13 (2 rows) |
We looked at n8n's source to understand the difference. Upsert runs "update, and insert if nothing was updated" inside one database transaction. SQLite only lets one write happen at a time, so the second run waits and then finds the row. Postgres, with its default settings, lets two of those transactions run side by side, so both can find nothing and both insert. That fits what we measured, but it's our reading of the code, not something n8n documents.
One trade-off: Upsert keeps the latest submission. After 10 posts with the same email, our row showed the 10th name and phone number. "Check, then insert" keeps the first. If you want to keep the first source (say, which ad brought the lead in), don't map that column in the Upsert, or store it somewhere else.
Which database is my n8n using? If you never set DB_TYPE, it's SQLite. That's the default for a plain install and the official Docker image. Many docker-compose setups add Postgres; look for DB_TYPE=postgresdb in your environment.
Test 3: two fixes that held on Postgres
Fix A: let only one run go at a time. N8N_CONCURRENCY_PRODUCTION_LIMIT=1 makes self-hosted n8n queue production runs and process them one by one. With it set, both "check, then insert" and Upsert saved one row in every burst of 25 (5 bursts each). The queue was fast: all 25 runs in a burst finished 0.84 to 1.18 seconds after we started sending.
The catch is that the limit covers the whole instance. Every workflow started by a trigger or webhook waits in the same line, so one slow workflow holds up your lead intake. Manual runs and sub-workflows aren't queued, per n8n's docs. For a small business with a handful of workflows, that's usually fine.
A limit of 5 wasn't enough. "Check, then insert" still saved a duplicate in 2 of 10 bursts of 25. Upsert held in all 10. Five is also the concurrency cap on n8n Cloud Starter, according to the pricing page. That's our self-hosted setup with the same number, not a test of Cloud.
Fix B: a real table with a unique email rule. If you already run Postgres, make a leads table where email must be unique, then save leads with n8n's Postgres node:
CREATE TABLE leads (
id serial PRIMARY KEY,
email text NOT NULL UNIQUE,
name text, phone text, service text, source text,
received_at timestamptz DEFAULT now()
);
INSERT INTO leads (email, name, phone, service, source)
VALUES ($1, $2, $3, $4, $5)
ON CONFLICT (email) DO NOTHING
RETURNING id;
In the Postgres node, use Execute Query and pass the values under Options → Query Parameters (we used {{ [$json.body.email, $json.body.name, $json.body.phone, $json.body.service, $json.body.source] }}). The database itself refuses the second copy, however many arrive at once. We got one row in all 30 bursts of 10, 25 and 50, across 850 runs. RETURNING id returns nothing for a duplicate, so the workflow stops there and doesn't send a second welcome email.

Test 4: what happens when the table fills up
n8n's docs say all Data Tables on an instance share a 200 MiB limit by default. Self-hosters can change it with N8N_DATA_TABLES_MAX_SIZE_BYTES. Exceed it and inserts and updates fail. To see what that looks like, we set the limit to 1 MB on Postgres and 3 MB on SQLite and loaded 1,000 leads per run until it broke.
How much fits. Our lead rows (email, name, phone, service, source, timestamp) took about 180 bytes each on SQLite (6,100 rows used 1,093,632 bytes) and about 200 on Postgres. That puts the default 200 MiB at roughly a million rows of that shape. Longer text, such as job descriptions or AI output, fills it faster.
The warning. n8n's limits check reported "warn" at 84% (Postgres) and 88% (SQLite) of our test limits. n8n's docs say the warning appears at 80% in the UI.
It overshoots once, then stops everything. The size is checked before a write, not during it, so the run that crossed the line was saved in full: we ended at 103% (Postgres) and 106% (SQLite) of the limit. The next 1,000-lead run saved 0 rows. It didn't save part of the batch. After that, every single lead failed too, via Upsert and via "check, then insert", with this error:

The person filling in your form isn't told. Our intake webhooks reply as soon as they receive data, the usual setup for a website form. Over the limit, they still returned HTTP 200 with {"message":"Workflow was started"}, while the run errored and saved nothing. If you rely on Data Tables for leads, set up an error workflow so a failed save reaches you.
Getting back under the limit isn't the same on both databases:
- SQLite: deleting the oldest 6,100 rows dropped the usage from 3.18 MB to 2.10 MB. New leads saved again within 8 seconds.
- Postgres: deleting half the rows changed nothing. Usage stayed above the limit, and new leads kept failing 35 and 70 seconds later. A plain
VACUUMdidn't help either. OnlyVACUUM FULLon the table shrank it (from 1,064,960 to 622,592 bytes), and leads saved again when we retried a minute later. n8n measures Postgres tables by their size on disk, and Postgres doesn't shrink a table when rows are deleted.VACUUM FULLlocks the table while it runs, so do it when nothing is coming in.
Bulk speed, for reference: one run that inserted 100, 1,000 and 5,000 leads took 0.43, 2.81 and 11.69 seconds on SQLite (about 230 to 430 rows a second).
What we'd do
- SQLite (the default), normal small-business volume: a Data Table with the Upsert operation matched on email. The template on this page is exactly what we tested.
- Postgres, or anything that might send bursts (imports, batch syncs, apps that retry): a Postgres table with
UNIQUEon email andON CONFLICT DO NOTHING. If you'd rather stay with Data Tables, use Upsert plusN8N_CONCURRENCY_PRODUCTION_LIMIT=1. - Everyone: add an error workflow, and check the size at roughly a few hundred thousand rows. A Data Table is a good lead list. It isn't a database with guarantees, so don't use it as your only copy of something you can't afford to lose.
For scale: Make's Free plan gives you one data store of 1.0 MB (we hit that in an earlier build). n8n Data Tables come with every n8n Cloud plan per the pricing page, and on self-hosted n8n they're free up to whatever limit you set. If you're still choosing between the two, our Make vs n8n vs Zapier comparison covers the rest.
Set up the template
- Download the template from the box on this page and import it into n8n (open a new workflow and paste the file's contents onto the canvas).
- Create a Data Table called
leadswith text columns: email, name, phone, service, source, received_at. - Open Upsert lead by email and pick your
leadstable. The match condition is already set to the email column. - Point your website form at the webhook's Production URL, sending JSON with those field names.
- Publish, send the same test lead three times, and check that you have one row. On our test import, three posts gave one row holding the third post's data.
- If your n8n runs on Postgres, use Fix A or Fix B above before you rely on it.
Don't want to run a server? Try n8n Cloud (affiliate link). The trial needs no card. Starter is €20 a month billed annually and allows 5 runs at once, per the pricing page on November 13, 2026.
FAQ
Do n8n Data Tables prevent duplicates? No. There's no unique-column setting. "If Row Does Not Exist" followed by Insert duplicated leads in 48 of 52 bursts of 10 or more. Upsert prevented them on SQLite in our tests. On Postgres it still let a second copy through.
What is the n8n Data Table size limit? 200 MiB for all tables on an instance combined, by default. Self-hosted instances can change it with N8N_DATA_TABLES_MAX_SIZE_BYTES. We fit roughly 180 to 200 bytes per simple lead row.
What happens when n8n Data Tables are full? Every insert and upsert fails with "Data table size limit exceeded". A webhook set to reply immediately still tells the sender it worked. Free space by deleting rows. On Postgres, also run VACUUM FULL on the table.
Can I make a Data Table column unique? Not in n8n 2.44.6. If you need that guarantee, use a real database table with a UNIQUE constraint.
Does N8N_CONCURRENCY_PRODUCTION_LIMIT slow everything down? It queues every production run on the instance. With a limit of 1, a burst of 25 quick lead runs finished in about a second, but a slow workflow would make the others wait.
Does The Automated Shop earn a commission from n8n? Yes, if you sign up through our "Try n8n Cloud" link, which is an affiliate link. It costs you nothing extra and doesn't change our test results. Citation links to n8n's docs and pricing page carry no referral tag. See our affiliate disclosure.