n8n data tables versus an external database

n8n data tables suit small lookup, deduplication and prompt data inside a workflow project. Shared, large, audited or externally consumed data belongs in PostgreSQL or another database you operate.

On this page

When n8n data tables are enough and when they are not

For many lookup and marker workloads, n8n's built-in data tables are enough, and an external database is only needed when the data has to outlive the n8n environment, be shared with other systems, or be governed by database controls your organization already runs. A team building workflows that must remember state or look up values should first list each piece of data it needs and ask who else reads it. According to n8n's data tables documentation, data tables store data inside the n8n environment for uses such as persisting data across workflows in a project, deduplication markers, reusable prompts, evaluation data and lookup tables. Those are the common cases where a table inside n8n keeps the logic in one place and avoids an extra connection to manage.

Data tables can be managed in three ways: through the Data Table node inside a workflow, through the DataTable API endpoint, or through the Data tables tab in the n8n interface. The node suits reads and writes made as part of a workflow run, the API suits tooling or scripts that load reference data, and the tab suits reviewing or editing contents by hand. Each route acts on the same stored data, so the choice affects who can change the data and how changes are audited, not what the table can hold. Before standardizing on tables, confirm with n8n's current documentation which operations each route supports, how the tables appear in project permissions and how they are included in backups, because those details decide whether a table fits your access model and recovery plan.

Look for the signs that point to PostgreSQL or another database instead. Reporting teams that query the data with SQL, applications outside n8n that need the same records, retention or backup rules that must match a database standard, and volumes or concurrency you have not tested in your own environment all argue for an external database. A practical check is to run the planned workflow against a realistic copy of the data in a non-production instance and record how it behaves under load and during an upgrade. Keep the decision documented, since a table that starts as a marker store often becomes a system of record later.

Which workload fits data tables and which fits an external database

Lookup tables map a value in one system to a value another system needs, such as a cost center code to a team name or a product SKU to a tax category. Data tables suit this well when the table is small, changes occasionally, and is read mainly by the workflows in one n8n project. Editors can maintain the rows in the Data tables tab without database access, which keeps the reference data close to the logic that uses it. A workflow should write to PostgreSQL or another database when the same mapping must be shared with other applications, reports or services, or when the owning team already keeps it in a governed system of record.

  • Good fit: a few hundred rows of mapping data maintained by the automation team.
  • Good fit: reference values that workflows read on each run and rarely change.
  • Move to a database: the mapping is also needed by a BI tool, an ERP or another application.
  • Move to a database: the data needs backups, retention rules or change history owned by a database team.
  • Check: how often the table is read per execution and whether lookups stay fast at your row count.

Confirm the row volume, read frequency and who owns the source of truth before choosing, and test lookup timing with your real table size.

Configuration options and when each fits

This table compares n8n data tables, PostgreSQL reached through n8n database nodes, and another external database across ownership, outside access, backup, access control and fit for common workflow data. Read each row against who will query the data and who will restore it after a failure. Items marked as points to confirm should be checked with n8n or the database vendor before you commit.

Factorn8n data tablesPostgreSQL via database nodesAnother external database
Data ownershipStored inside the n8n environment and managed with n8nA PostgreSQL server you run in infrastructure you controlOwned by the team that operates that database system
Who can query outside n8nPoint to confirm: documented access is through the Data Table node, the DataTable API and the Data tables tabAny client with network and database credentials, such as a BI tool or scriptDepends on that system's own clients and access model; confirm
Backup and restorePoint to confirm: whether and how tables are included in instance backups and restoresYour team; continuous archiving and point-in-time recovery are documented options, and restores need testingYour team or the vendor's tooling; confirm the method and restore test
Access controlPoint to confirm: how table access follows n8n project and role settingsAuthentication methods include password, LDAP, certificate and OAuth, with grants set per database roleSet by that system's authentication and authorization model; confirm integration with your identity provider
Deduplication markersDocumented use; suits markers written and read by the same workflowsSuits markers that must outlive n8n changes or be checked by other systemsSuits markers when your platform already runs a store with the needed reliability
Reusable promptsDocumented use; suits prompts edited and used inside n8nSuits prompts shared with applications outside n8n or kept under separate reviewSuits prompt stores already governed by your AI platform
Evaluation setsDocumented use; suits small evaluation sets reviewed within n8nSuits large or shared evaluation sets queried by analysts or other toolsSuits evaluation data already held with your analytics or AI tooling
Lookup tablesDocumented use; suits small reference tables maintained inside n8nSuits reference data owned by a business system and updated outside n8nSuits reference data that must follow that system's governance and retention rules
Size and write volumePoint to confirm: documented limits for row count, size and concurrent writesSized by your database administrators for the workload; test with realistic volumesPoint to confirm: limits and scaling model with the vendor

Setting up data tables and an external database side by side

This sequence sets up one workflow that keeps working data in an n8n data table and another that writes to PostgreSQL, so you can confirm which store each workflow uses before either one goes to production.

  1. Decide data ownership for each workflow

    Before building anything, list every dataset the workflows touch and assign each one to a store. Lookup tables, deduplication markers, reusable prompts and evaluation data are candidates for n8n data tables, while records that other systems read, need joins with existing tables, or must survive a platform change belong in PostgreSQL. Ask the workflow owner and the data owner to sign off on the list. You know this step is done when every dataset has one named store and one named owner.

  2. Create the data table in the project

    Create the data table inside the n8n project that owns the workflow, define its columns and types, and record the table name and project in your build notes. Confirm the table is visible in the Data tables tab for users with access to that project. Then run a test workflow with the Data Table node to insert and read one row. You know this step is done when the test row returns the values you wrote and the table appears under the correct project.

  3. Confirm access through the Data Table node and API

    Check that the workflow can reach the table through the Data Table node and, if other tools need it, through the DataTable API endpoint. Use a service account or workflow context that matches production, not a personal administrator account, so access problems show up now. Confirm that a user outside the project cannot read the table. You know this step is done when the node and API both return the expected rows and the out-of-project check fails as intended.

  4. Define the PostgreSQL schema and credentials

    For the external path, create a dedicated database, schema and role for the n8n workflow, grant only the privileges the workflow needs, and define the table and its indexes. Store the database credential in n8n as a credential and avoid placing it in workflow parameters. Ask your database team to confirm the connection settings for your environment. You know this step is done when a direct query from the role succeeds on the intended table and fails on an unrelated table.

  5. Confirm each workflow writes to the intended store

    Run each workflow once with a test payload and check where the record landed. Query the PostgreSQL table directly and open the data table in n8n, and confirm that the data appears in exactly one place. Check that the workflow does not write to both stores by accident. If you run queue mode, the main instance's encryption key must be shared with all worker and webhook processor nodes so they can access credentials stored in the database, and the workers must reach the same PostgreSQL database. You know this step is done when each test record appears only in its intended store and a worker-executed run produces the same result as a main-instance run.

  6. Verify reads and writes after a restart

    Restart the n8n main instance and each worker, then rerun the read and write tests. Confirm the data table rows and PostgreSQL rows are still present and that the workflows still resolve their credentials. Record the restart procedure and the test results in your change record so the same check can be repeated after upgrades. You know this step is done when every test returns the same values after the restart and the change record names the check that was run.

How workflow data moves between n8n and its stores

A trigger starts a run on the n8n main instance, which either hands executions to queue workers or runs them directly. Workers read and write workflow data in PostgreSQL, and the Data Table node and DataTable API both reach data tables inside the n8n environment. The trust boundary sits between n8n and the external database, so confirm which credentials and network paths cross it and who can reach each store.

Access paths from n8n workflows to data tables and an external PostgreSQL database.

Security and operational risks of keeping data inside n8n

Data tables sit inside the n8n environment, so they inherit its access model, its backup routine and its audit trail. The four to six risks below are the ones that change the decision between n8n data tables and an external database, and each one has a concrete check you can run before a workflow depends on the table.

Access control through projects and roles

Data tables are managed inside n8n, so who can read, edit or delete a table depends on the project it belongs to and the role each user holds in that project. A table shared by a team that should not see its contents becomes a data exposure problem, not a configuration detail. Before go-live, list every project that can reach each table, confirm which roles can write to it, and test the result with a user from each group. Confirm with n8n how SSO and role mapping apply on your plan, since the pillar facts tie SSO to the Business and Enterprise plans.

Data tables docs

Credential handling for external databases

A workflow that writes to PostgreSQL stores its connection credentials in n8n, and in queue mode the encryption key must also be shared with every worker and webhook processor so they can read those credentials. Data tables avoid this step, which is one reason teams keep small lookup tables inside n8n. Check who can view or export credentials, which database role the workflow uses, and whether that role has only the privileges the workflow needs.

Queue mode docs

Backup and restore responsibility

Data tables are part of the n8n environment, so a backup of the n8n database and its configuration is what protects them. An external PostgreSQL database has its own backup, point-in-time recovery and restore procedure, which your database team may already run and test. Decide who owns restore for each dataset, record the recovery point each one needs, and rehearse a restore of a data table on a separate instance before relying on it for deduplication or evaluation history.

Data retention and personal data placement

Deduplication markers, prompts and evaluation records can contain personal data such as customer identifiers, email addresses or support text, and that data then lives in the n8n environment with its own deletion behavior. Map each table to a retention rule and to a deletion path that your privacy team can verify. If a table must hold personal data for a defined period, an external database with documented retention controls is often easier to audit. Ask your privacy and legal team to confirm the requirement before the data is written.

Audit visibility of data changes

Auditors ask who changed a record, when, and through which workflow. Data table activity needs to be traceable to a workflow execution and a user, and you need to confirm how far that trail goes on your plan. Log streaming, which sends audit and workflow events to a SIEM, is tied to the Enterprise plan in the pillar facts. For an external PostgreSQL database, you can combine database logging with the execution history of the calling workflow. Test whether a deleted row can be traced end to end.

Change control for shared tables

A data table used by several workflows is a shared dependency, and a schema change or a bulk edit can break every workflow that reads it. An external database supports schema migrations, reviews and separate environments, while data tables need a documented owner and a change process your team follows. Name the owner for each table, record which workflows depend on it, and require a review before any column change.

Running PostgreSQL behind an n8n workflow

Choosing an external PostgreSQL database for a workflow is an operating decision, not a storage decision. Once a workflow writes to PostgreSQL, your team owns the database's license position, its supported versions, its upgrade path, its availability design and its backups. PostgreSQL is released under the PostgreSQL License, a liberal open source license similar to the BSD or MIT licenses, so there is no license gate on running it inside your own infrastructure. The cost lies in the operations: someone must track which major versions remain supported, and the supported versions in the current policy are 18 (final release November 14, 2030), 17 (to November 8, 2029), 16 (to November 9, 2028), 15 (to November 11, 2027) and 14 (to November 12, 2026). Version 13 and earlier are unsupported.

Plan the two upgrade types separately. Minor releases never change the internal storage format, so applying one means replacing executables and restarting, and PostgreSQL ships them at least once every three months. Major upgrades are heavier. The documented routes are dump and restore with pg_dumpall, pg_upgrade, or logical replication, which works between major versions and, according to the upgrade documentation, can keep downtime to several seconds. Test the route against a copy of your n8n database before choosing it, and confirm with your own DBA which option matches your recovery window. For availability, PostgreSQL supports hot standby servers that serve read-only queries and both synchronous and asynchronous replication. Synchronous replication makes each commit wait for standbys, which trades write latency for durability. PostgreSQL does not detect a failed primary or promote a standby on its own, so automatic failover requires external tooling that you must select, configure and test.

Backups and connections need the same scrutiny. Point-in-time recovery depends on continuous archiving of write-ahead logs, and a restore is only proven once your team has replayed it to a chosen moment in a test environment. Connection pooling with PgBouncer is a separate decision: n8n's own connections and any workflow nodes that query the same database compete for a limited number of server connections, and a pooler changes which PostgreSQL features your clients can rely on. Ask your team to document which connections go through the pooler, which do not, and what happens when the primary fails over.

Limits to confirm in your environment

Built-in data tables are convenient, but their size, behavior and lifecycle depend on the n8n release you run and how you deploy it. The cards below list the points to verify with n8n's documentation and your own tests before a workflow depends on a data table in production.

Table size and row limits

Confirm the maximum number of tables, rows and columns your n8n version allows, and how lookups slow down as a table grows. A lookup table that stays small is a good fit, while a table that grows with every execution is a sign it belongs in PostgreSQL. Run a load test with a row count close to your expected peak, and record query time for the lookups your workflows make.

Reference release
2.43
Data tables docs

Behavior under queue mode

Confirm how data tables are read and written when the main instance hands executions to workers. Queue mode spreads work across processes, so a deduplication marker written by one worker must be visible to the next. Test concurrent writes from several workers and check for duplicate or lost entries before you rely on the table for deduplication.

Export and migration options

Confirm whether you can export a data table as a file, read it through the API, and move it to another instance or to PostgreSQL. Data inside n8n is harder to migrate if you later outgrow it. Ask n8n how table contents are included in backups and environment moves, and test a restore on a separate instance.

Deletion and retention behavior

Confirm how rows are deleted, whether they can be purged on a schedule, and whether deleted rows remain in backups. Deduplication markers and evaluation records often carry personal data, so retention rules must be enforceable. Write a test that deletes rows, then checks the table, the backup and any exported copy.

Access and permissions

Confirm which projects, roles and users can read, write or delete a data table, and whether a workflow can change a table it does not own. Table access should follow the same project model as your workflows. Verify these rules with test accounts that hold each role.

Your deployed release

Confirm the exact n8n version your team runs and the data table behavior documented for that version, since limits can change between releases. n8n 2.43 was released on 6 October 2026 and ships minor releases roughly weekly. Record the version in your change log and retest data table workflows after each upgrade.

Release notes

Questions teams ask before choosing data tables or PostgreSQL

Do n8n data tables cost extra on each plan?

The supplied pricing facts do not say that data tables are priced separately, so confirm this on the n8n pricing page before you decide. What the pricing page does state is that every plan includes unlimited users, workflows and integrations, and that an execution counts as one run of a whole workflow. Plan differences mainly affect features such as SSO, Git environments and log streaming, which sit on the Business and Enterprise plans. Ask n8n to confirm in writing whether data table storage or rows have any limit on your edition and hosting model.

How much effort does an external PostgreSQL database add?

It adds more than a data table because your team owns the database lifecycle. The work includes provisioning, network access, credentials, schema design, backups, restore tests, monitoring, and upgrades. PostgreSQL's versioning policy sets a support window for each major version, so a database you run becomes a recurring maintenance task. Effort rises with the number of workflows writing to it, the data volume, and how many systems share the database. Get the scope of each of these items in a written quote before you commit.

What does the work need from our internal team?

Plan for three roles: someone who owns the data model and which workflows read and write each table, someone who runs the database platform, and someone who approves access and retention rules. Security and compliance staff need to agree where personal or regulated data may sit, since data tables live inside the n8n environment and an external database lives in your own infrastructure. Your team also needs to decide who may change schemas and who receives alerts when a write fails.

Can a team set up data tables or PostgreSQL alone?

A team with n8n and database experience can usually set up data tables alone, because they are managed from the Data Table node, the DataTable API endpoint or the Data tables tab. An external PostgreSQL setup is more demanding. It needs backup and point-in-time recovery testing, connection pooling, and a plan for high availability, because PostgreSQL does not detect a primary failure or fail over by itself. If nobody on the team has run a production database, bring in help for the design and the first build.

How long does an assessment take?

It depends on scope. The number of workflows that use lookup tables, deduplication markers or evaluation data, the volume of rows, the data sensitivity, and whether you need high availability all change the work. A narrow review of two or three workflows is much shorter than a review that maps every workflow in several environments. DeployOpen plans engagements as fixed scope, with deliverables and timelines agreed in writing before work starts, so ask for a timeline tied to a written scope.

Which PostgreSQL version should we plan around?

Pick a version that is still inside its support window for the whole life of the deployment. The supported versions and end dates are listed in the PostgreSQL versioning policy. Version 14 reaches end of support on November 12, 2026, so a new build should start on a newer major version. Minor releases do not change the storage format, so applying them is a matter of replacing executables and restarting, while major upgrades need a planned method such as logical replication.

When should we bring in outside help?

Bring in outside help when the workflows will hold regulated or sensitive data, when more than one team will share the database, or when you need high availability and tested recovery. Outside help is also useful before a major upgrade or when a workflow moves from data tables to PostgreSQL. DeployOpen plans, implements, hardens, backs up, upgrades and documents self-hosted platforms in your own infrastructure, and it can review the design before build starts. It does not issue audit reports or certifications.

How DeployOpen scopes data storage for n8n workflows

DeployOpen starts from the data each workflow reads and writes, then decides with you whether n8n's built-in data tables or a database you operate should hold it. The written scope records that decision, the reasons for it and the operating duties it creates.

How we scope

  • Inventory every workflow that reads or writes persistent data, with its volume, sensitivity and owner.
  • Record which data stays in n8n data tables and which moves to PostgreSQL or another database, with the reason for each.
  • Agree in writing who owns backups, retention, access and schema changes for each data store before build starts.

How we build

  • Create data tables for lookup, deduplication and prompt data, and wire them into workflows through the Data Table node.
  • Configure external database nodes with dedicated, least-privilege accounts, and keep credentials out of workflow exports.
  • Test each workflow against realistic failure cases, such as duplicate triggers, partial writes and a restarted instance.

How we hand over

  • Document each data store, its owner, its backup source and its restore steps in a handover pack.
  • Walk your operations team through the data table limits and the conditions that trigger a move to an external database.
  • Deliver the written record of design decisions so your security and compliance reviewers can trace where data lives.

How we support

  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and retesting after n8n or database version changes are available as a retainer.
  • Confirm the support terms, response expectations and change process in the written scope before signing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.