n8n Data Tables and the Data Table node
Updated 2026-10-21 · 6 min read
- Data Tables are small tables inside your n8n instance, on all plans since n8n 1.113.
- Tables in one instance share 200 MiB by default. Past it, inserts and updates fail.
- The Code node can't read them. Use the Data Table node and pass rows in as items.
n8n Data Tables are small tables stored inside your n8n instance. You can reach them three ways:
- Workflows read and write them with the Data Table node.
- People browse and edit them in the Data tables tab.
- Scripts use the
/datatablesAPI.
Many automations need to "remember this between runs": processed IDs, the last sync time, lookup lists, prompts. That used to mean a spreadsheet or a tiny database. Data Tables replace it. This page covers what they are good for, every node operation, the limits, and patterns you can copy.
What Data Tables are (and aren't)
The docs list these typical uses:
- Persisting data across workflows in the same project
- Markers to prevent duplicate runs
- Reusable prompts and messages
- Lookup tables
- Storing data produced by executions
A table belongs to a project. Everyone in the project can use it, and owners and admins can see all tables. Data Tables came with n8n 1.113 and are available on all plans (release notes).
They are not a production database. The size limit is small, and the Code node can't query them directly. For millions of rows, use Postgres or another database node.
Create a table
In a project, open Data tables > Create Data table and give it a name. Then choose how to start:
- From scratch: define the columns and add rows in the UI.
- Import CSV: the columns and rows come from the file.
Later you can rename and reorder columns, edit rows, and Download CSV from the table's menu. The Data Table node can also create, list, update and delete tables from a workflow.
Data Table node operations
The node works on rows and on whole tables (node docs):
| Resource | Operation | What it does |
|---|---|---|
| Row | Insert | Adds rows from the input items |
| Row | Get | Returns rows that match the filters |
| Row | Update | Updates matching rows |
| Row | Upsert | Updates a matching row if one exists, inserts a new one otherwise |
| Row | Delete | Deletes matching rows |
| Row | If Row Exists | Passes on input items that match a row |
| Row | If Row Does Not Exist | Passes on input items that don't |
| Table | Create, List, Update, Delete | Manages tables |
For automation, If Row Exists and If Row Does Not Exist are the most useful. They work as filters against the table. "Skip anything we've already processed" becomes one node.
Limits
| Limit | Value |
|---|---|
| Total storage per instance | 200 MiB by default |
| Change it (self-hosted) | N8N_DATA_TABLES_MAX_SIZE_BYTES |
| Warning | At 80% of the limit |
| Over the limit | You can't add rows by hand; inserts and updates in workflows fail |
| Code node access | Not supported |
Every table on the instance shares those 200 MiB. A table that logs every execution will hit the limit eventually. Prune old rows with a scheduled Delete.
Patterns
1. Process each record once
Schedule → HTTP Request (new orders) → Data Table: If Row Does Not Exist (order_id)
→ Process → Data Table: Insert (order_id, processed_at)
Rows that already exist are dropped before processing. Insert only after processing succeeds. Then a failed run retries the record next time.
2. Remember the last sync time
Create a table sync_state with the columns key and value.
- Data Table Get where
key = orders_last_sync. - HTTP Request with
?updated_since={{ $json.value }}. - After processing, Data Table Upsert
key = orders_last_sync,value = {{ $now.toISO() }}.
This also works in test runs. Workflow static data doesn't.
3. Lookup table
A country_routing table maps country codes to Slack channels or sales owners. Non-developers edit the table in the UI, and the workflow reads it with Get. A routing change needs no redeploy.
4. Alert deduplication
Use this in an error workflow. Get the last alert time for the failing workflow. If it was less than an hour ago, skip. Otherwise send the alert and Upsert the timestamp.
5. Using rows in code
Read the rows with a Data Table node first. The Code node then receives them as items:
const rows = $('Get routing').all().map(i => i.json);
const byCountry = Object.fromEntries(rows.map(r => [r.country, r.channel]));
return $input.all().map(i => ({
json: { ...i.json, channel: byCountry[i.json.country] ?? '#general' }
}));
Data Tables vs static data vs Variables
n8n has three places to keep values between runs. Workflow static data is a small JSON object saved with one workflow. Variables are fixed key-value settings that workflows can only read.
| Data Tables | Workflow static data | Variables | |
|---|---|---|---|
| Shape | Rows and columns | A small JSON object | Key → string |
| Who can use it | Project | One workflow (or one node) | Instance or project |
| Written by workflows | Yes | Yes, JavaScript Code node only | No (read-only) |
| Works in test runs | Yes | No: saved only for published, triggered runs | Yes |
| Plan | All | All | Cloud Pro/Enterprise, self-hosted Business/Enterprise |
The static data docs themselves recommend Data Tables for keeping data between executions. They say static data is experimental, may be unreliable when a workflow runs very often, and should stay small.
Moving data in
- CSV: export from the old system, then create the table with Import CSV.
- API: POST the rows to the
/datatablesendpoint of the n8n public API. - Workflow: build a one-off workflow. It reads the source (HTTP Request, Google Sheets, a database node) and runs Data Table Insert or Upsert.
From Pipedream data stores
Pipedream data stores were key-value stores shared across workflows (Pipedream data stores). They supported TTL, an expiry time per key. You used them from code (this.dataStore.get/set) or from no-code actions. They are not in the workflow export, and Pipedream deletes all Workflows data by April 30, 2027.
| Pipedream | n8n Data Tables |
|---|---|
| Data store | Table with columns key, value (plus expires_at if you used TTL) |
get(key) |
Get where key = … |
set(key, value) |
Upsert on key |
has(key) |
If Row Exists |
delete(key) |
Delete |
| TTL | expires_at column + scheduled Delete of expired rows |
Values that were objects become JSON strings in a column. If the shape is fixed, use separate columns instead. The backup steps and code for each call are in Pipedream data stores to n8n.
Our converter lists every step that touches a data store. In the converted code, those calls use workflow static data, so the workflow runs at all. For any data you rely on, move the calls to Data Tables as shown above. Check single steps with the Code node compatibility check, or the whole export with the converter. The report and 1 workflow are free. Full export: $3 per workflow, $1 each after 50, $19 minimum, one-off.
Not affiliated with Pipedream or n8n.
FAQ
What are n8n Data Tables?
Built-in tables stored inside your n8n instance and scoped to a project. Workflows read and write them with the Data Table node. You can also manage them in the Data tables tab or through the /datatables API.
How much data can n8n Data Tables hold?
By default, 200 MiB in total across all data tables in an instance. Self-hosted instances can change it with N8N_DATA_TABLES_MAX_SIZE_BYTES. Past the limit, inserts and updates fail.
Can I read a Data Table from the n8n Code node?
No. Direct access from a Code node isn't supported. Read rows with the Data Table node first and pass them into the Code node as input.
Is there an n8n data store node?
The built-in option for storing records between executions is the Data Table node. For small values tied to one workflow, the JavaScript Code node also has workflow static data.
Can I import a CSV into an n8n Data Table?
Yes. In the Data tables tab, create a table with Import CSV. You can also download any table as CSV.
Sources (5)
- https://docs.n8n.io/build/work-with-data/data-tables
- https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.datatable
- https://docs.n8n.io/build/code-in-n8n/cookbook/built-in-methods-and-variables-examples/getworkflowstaticdata
- https://docs.n8n.io/changelog/release-notes-1.x
- https://pipedream.com/docs/workflows/data-management/data-stores