How to Use the Built-in Data Table in n8n Workflows

Learn how to leverage n8n’s built-in data table to store, query, and manipulate information in your automated workflows.

Introduction

n8n’s built-in data table (officially called the Data Table node) is a powerful, low-code way to store structured data inside your workflows without relying on external databases. You can define your own columns, dynamically create records, run lookups, and perform updates—all within the n8n environment.

Whether you’re managing user preferences, caching API calls, or creating dynamic routing rules, using the built-in data table enables persistent data handling that plays well with both simple and advanced workflows.

In this guide, I’ll walk you through how to set up and use n8n’s built-in Data Table in real-life automation scenarios.

Prerequisites

Before we begin, make sure:

  • You’re running n8n v1.23.0 or higher (the Data Table node was introduced in v1.23.0).
  • You have access to either a cloud* or *self-hosted n8n instance.
  • Your user role has workflow and data permissions.
  • For self-hosted setups, ensure that your instance supports saving internal database values (i.e., using SQLite, Postgres, or MySQL as the backend DB).

    Why Use Data Tables in n8n?

    Using Data Tables provides:

  • Persistent data: Stored values remain across executions
  • No external DB setup: Built-in and ready to use
  • Native integration: Works directly with expressions and other nodes
  • Lightweight key-value replacement: Store structured “state” logic without Redis or memory hacks
  • Step-by-Step Guide to Using the Data Table

    Let’s build a basic workflow to understand how it works: we’ll store user form submissions in a Data Table and later look up the record.

    1. Create a New Data Table

    1. In the left panel, click the gear icon*, then choose *Data Tables.
    2. Click + New Table.
    3. Name your table `user_submissions`.
    4. Add columns:
    – `user_id` (Text)
    – `email` (Text)
    – `interest` (Text)
    – `timestamp` (DateTime)
    5. Save the table.

    ![Screenshot of Data Table creation in n8n](your-image-url.jpg)

    2. Capture Data via Webhook

    Add a Webhook node to accept incoming data from a front-end form.

  • HTTP Method: POST
  • Path: `submit-user`
  • Response Mode: On Received
  • Execute the workflow and send test data:

    json
    {
    "user_id": "abc123",
    "email": "user@example.com",
    "interest": "automation"
    }

    3. Write to the Data Table

    After the Webhook node, add the Data Table node.

  • Operation: Create
  • Table: `user_submissions`
  • Values to Send:
  • json
    {
    "user_id": "{{$json["user_id"]}}",
    "email": "{{$json["email"]}}",
    "interest": "{{$json["interest"]}}",
    "timestamp": "={{$now}}"
    }

    This saves each submissions with a timestamp.

    ![Screenshot of Data Table node settings for inserting records](your-image-url.jpg)

    4. Query a Submission by User ID

    Add a new Data Table node with these settings:

  • Operation: Query Rows
  • Table: `user_submissions`
  • Filters:
  • json
    {
    "user_id": "abc123"
    }

    This fetches the row we saved earlier.

    Use a Set node after that to format the result or parse downstream.

    5. Optional: Update or Delete Entries

    To update, use:

  • Operation: Update
  • Filter: `user_id == abc123`
  • New Values:
  • json
    {
    "interest": "devops"
    }

    To delete:

  • Operation: Delete
  • Filter: `user_id == abc123`
  • Best Practices for Using Data Tables

    In my projects, I’ve used Data Tables to maintain workflow user settings, implement deduplication logic, and even cache third-party credentials. Here are some best practices:

  • Index frequently queried fields: While n8n doesn’t expose indexing UI yet, keeping filters performant means choosing unique identifiers like `user_id` or `email`
  • Limit rows per use-case: Avoid thousands of rows unless you’re self-hosting and scaling properly
  • Sanitize inputs: Always validate external inputs before inserting them to avoid injection
  • Use timestamps: Add `created_at` and `updated_at` so you can track changes easily
  • Common Pitfalls & Fixes

    Missing Data Table Permissions

    If you see errors like `table not found`, check:

  • You’ve saved the Data Table in the settings area
  • You’re using the exact table name (case-sensitive)
  • Data Table Writes Not Persisting

    This can happen on self-hosted n8n using memory-only setup. Use a persistent database backend like Postgres or SQLite.

    Filters Not Matching Anything

    Make sure:

  • Filter values are wrapped in correct types (e.g., don’t match number to a string)
  • Watch out for trailing spaces in user input
  • Integrating Data Tables into Real Workflows

    Data Tables shine in scenarios like:

  • User state tracking: Store auth tokens, settings, progress
  • Workflow deduplication: Check for previous runs by ID
  • Retry logic: Save failed request data and reprocess later
  • Dashboarding: Collect workflow execution data for reporting
  • You can also combine them with:

  • [Code node](https://docs.n8n.io/nodes/n8n-nodes-base.code/): for logic branching
  • [HTTP Request node](/mastering-http-request-node): fetch external data, then persist
  • Scheduler: run cleanup jobs to remove old records

FAQ

What’s the row limit in n8n Data Tables?

There’s no hard limit, but performance depends on underlying DB. For cloud users, keep datasets manageable (~5,000 rows max).

Is this the same as n8n’s in-memory data?

No. Data Table records are persisted in the n8n database and survive workflow stops/reboots.

Can I export or back up a Data Table?

Not natively via UI yet, but you can use the Query Rows operation + [Spreadsheet File node](https://n8n.io/integrations/n8n-nodes-base.spreadsheetFile) to export to CSV.

Can I share records across workflows?

Yes, Data Table content is global. One workflow can insert, another can query.

Conclusion

n8n’s built-in Data Table feature makes managing persistent workflow data easier than ever. It removes the need to wire up external databases for many types of automations.

Start using this feature today to manage state, reduce API calls, and build smarter workflows entirely within n8n.

👉 See our post on [Mastering the n8n HTTP Request Node](/mastering-http-request-node) to combine with external APIs

👉 Explore [n8n Credential Management](/create-google-credentials-n8n) for secure integrations

Try this in your n8n instance today.

Related Posts