docs: update documentation for data tables (#4312)

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
Rowena Jones
2026-03-12 14:07:39 +01:00
committed by GitHub
parent 2a9a51dfb4
commit 881ae26c39
6 changed files with 300 additions and 42 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 607 KiB

View File

@@ -22,11 +22,25 @@ Data tables integrate data storage within your n8n environment. Using data table
- Combining data from different sources to enrich your datasets
- Creating lookup tables as quick reference points within workflows
## How to use data tables
## Working with data tables
There are two parts to working with data tables: creating them and interacting with them in workflows.
You can create, filter, and manage data tables and their data in three ways: using the **Data Table node**, the **DataTable API endpoint** , or the **Data tables tab**.
### Step 1: Creating a data table
### Data Table node
Use data tables inside workflows to store and manage data, enabling automated creation, retrieval, updates, and deletions as your workflow runs.
See the [Data Table node](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/index.md) for full documentation.
### DataTable API endpoint
Work with data tables programmatically using the `/datatables` endpoint in the n8n API.
See the [API reference](https://docs.n8n.io/api/api-reference/#tag/datatable) for full documentation.
### Data table tab
View and work with data tables directly in the UI through a visual interface. This lets you browse and edit data, and manage tables without building a workflow.
1. In your n8n project, select the **Data tables** tab.
2. Click the split button located in the top right corner and select **Create Data table**.
@@ -34,18 +48,24 @@ There are two parts to working with data tables: creating them and interacting w
![Data table creation](/_images/data/data-tables/create-data-table.png)
3. Enter a descriptive name for your table.
4. Select how to create the table:
- **From scratch**: Create a new table by manually defining columns and adding rows using the visual interface.
- **Import CSV**: Upload a CSV file to automatically create the table structure and populate it with data from the file.
In the table view that appears, you can:
* Add and reorder columns to organize your data
* Add, delete, and update rows
* Edit existing data
In the table view that appears, you can:
* Rename or delete the data table or its columns
* Add and reorder columns to organize your data
* Add, delete, and update rows
* Edit existing data
### Step 2: Interacting with data tables in workflows
## Exporting and importing data
Interact with data tables in your workflow using the **Data table** node, which allows you to retrieve, update, and manipulate the data stored in a data table.
From the **Data tables** tab, you can:
See [Data table node](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/index.md).
- Import CSV data directly into a data table, as described in the [previous section](#data-table-tab)
- Download a CSV of your data table. Click the three dot menu in the top left and select **Download CSV**.
## Considerations and limitations of data tables
@@ -65,14 +85,4 @@ See [Data table node](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/
| Optimized for short values | ✗ | ✓ |
| Structured data | ✓ | ✗ |
| Scoped to projects | ✓ | ✗ |
| Use values as expressions | ✗ | ✓ |
## Exporting and importing data
To transfer data between n8n and external tools, use workflows that:
1. Retrieve data from a data table.
2. Export it using an API or file export.
3. Import data into another system or data table accordingly.
![Data export workflow](/_images/data/data-tables/data-table-export.png)
| Use values as expressions | ✗ | ✓ |

View File

@@ -10,39 +10,50 @@ hide:
- tags
search:
boost: 1.5
status: beta
---
# Data table
Use the Data Table node to permanently save data across workflow executions in a table format. It provides functionality to perform various data operations on stored data. See [Data tables](/data/data-tables.md).
Use the Data Table node to create and manage internal data tables. Data tables allow you to store structured data directly inside n8n and use it across workflows.
You can use the Data Table node to:
## Node parameters
- Create, list, and manage data tables
- Insert, update, delete, and upsert rows in data tables
- Query and retrieve rows using matching conditions
### Resource
/// note | Working with data tables
As well as using the Data Tables node in a workflow, you can view and manage data tables manually from the **Data Tables** tab in your project **Overview**.
Select the resource on which you want to operate.
For information about working with data tables in this tab, and guidance on when to use data tables and their limitations, see [Data tables](/data/data-tables.md).
///
- Rows
## Resources
The Data Table node supports the following resources:
- **Data Table:** Create, list, update, and delete tables.
- **Row:** Insert, retrieve, update, delete, and upsert rows within a table.
### Operations
Select the operation you want to run on the resource:
See available operations below. For detailed information on parameters for different operation types, refer to the [Table operations](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/tables.md) and [Row operations](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/rows.md) pages.
* **Delete:** Delete one or more rows.
* **Dry Run:** Simulate a deletion before finalizing it. If you switch on this option, n8n returns the rows that will be deleted by the operation. Default state is `off`.
* **Get:** Get one or more rows from your table based on defined filters.
* **Limit**: The number of rows you want to return, specified as a number. Default value is 50.
* **Return all:** Switch on to return all data. Default value is `off`.
* **If Row Exists:** Specify a set of conditions to match input items that exist in the data table.
* **If Row Does Not Exist:** Specify a set of conditions to match input items that don't exist in the data table.
* **Insert:** Insert rows into an existing table.
* **Optimize Bulk**: Optimize the speed of insertions when working with many rows. If you switch on this option, n8n won't return the data that was inserted. Default state is `off`.
* **Update:** Update one or more rows.
* **Upsert:** Upsert one or more rows. If the row exists, it's updated; otherwise, a new row is created.
* **Rows**
* [**Delete:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/rows.md#delete-row) Delete one or more rows.
* [**Get:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/rows.md#get-row) Get one or more rows from your table based on defined filters.
* [**If Row Exists:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/rows.md#if-row-exists) Specify a set of conditions to match input items that exist in the data table.
* [**If Row Does Not Exist:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/rows.md#if-row-does-not-exist) Specify a set of conditions to match input items that don't exist in the data table.
* [**Insert:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/rows.md#insert-row) Insert rows into an existing table.
* [**Update:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/rows.md#update-row) Update one or more rows.
* [**Upsert:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/rows.md#upsert-row) Upsert one or more rows. If the row exists, it's updated; otherwise, a new row is created.
* **Tables**
* [**Create:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/tables.md#create-a-data-table) Create a new data table.
* [**Delete:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/tables.md#delete-a-data-table) Delete an existing data table.
* [**List:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/tables.md#list-data-tables) List existing data tables.
* [**Update:**](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/tables.md#update-a-data-table) Update an existing data table.
## Related resources
[Data tables](/data/data-tables.md) explains how to create and manage data tables.
[Data tables](/data/data-tables.md) explains how to create and manage data tables.

View File

@@ -0,0 +1,162 @@
---
title: Data Table node row operations
description: Reference documentation for Data Table node row operations, including delete, get, insert, update, and upsert.
contentType: [integration, reference]
priority: critical
---
Use row operations to delete, get, insert, update, upsert, or filter rows in a data table. Refer to the [Data Table node](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/index.md) documentation for more information on the node itself.
## Delete row
Use this operation to delete one or more rows from a data table, based on a defined condition(s).
Enter these parameters:
- **Resource:** Select **Row**.
- **Operation:** Select **Delete**.
- **Data table:** Select how to identify the data table to operate on:
- **From list:** Select the table from a drop-down list of all your data tables.
- **By Name:** Enter the name of your data table.
- **By ID:** Enter the ID of your data table
- **Must Match:** Select whether to delete rows that match **Any Condition** or **All Conditions** defined in the next step.
- **Conditions:** Click **Add Condition** to define which rows from the data table to operate on. You can add multiple conditions. For each one:
- **Column:** Select the column you want to compare.
- **Condition:** Choose how to compare the column value: **Equals**, **Not Equals**, **Greater Than**, **Greater Than or Equal**, **Less Than**, **Less Than or Equal**, **Is Empty**, or **Is Not Empty**.
- **Value:** Enter the value to compare the column against. You can use a fixed value or an expression that references data from previous nodes. This field doesn't exist for **Is Empty** and **Is Not Empty** conditions.
### Delete row options
Use these options to further refine the action's behavior:
- **Dry Run:** Enable to simulate deletion without modifying the table. The node returns rows that would be deleted, including their state before and after the operation.
## Get row
Use this operation to retrieve one or more rows from a data table, based on a defined condition(s).
Enter these parameters:
- **Resource:** Select **Row**.
- **Operation:** Select **Get**.
- **Data table:** Select how to identify the data table to operate on:
- **From list:** Select the table from a drop-down list of all your data tables.
- **By Name:** Enter the name of your data table.
- **By ID:** Enter the ID of your data table
- **Must Match:** Select whether to get rows that match **Any Condition** or **All Conditions** defined in the next step.
- **Conditions:** Click **Add Condition** to define which rows from the data table to operate on. You can add multiple conditions. For each one:
- **Column:** Select the column you want to compare.
- **Condition:** Choose how to compare the column value: **Equals**, **Not Equals**, **Greater Than**, **Greater Than or Equal**, **Less Than**, **Less Than or Equal**, **Is Empty**, or **Is Not Empty**.
- **Value:** Enter the value to compare the column against. You can use a fixed value or an expression that references data from previous nodes. This field doesn't exist for **Is Empty** and **Is Not Empty** conditions.
- **Return All:** Enable to return all matching rows. Or, disable and enter a **Limit** for the number of rows to return, for example `50`.
- **Order By:** Enable to define the column to order results on, and the direction (ascending or descending). Or, disable for no ordering of results.
## If row exists
Use this operation to check whether a row matching the defined condition(s) exists in a data table. If a matching row is found, the node outputs the same input item it received, unchanged. If no matching rows exist, it outputs nothing.
Enter these parameters:
- **Resource:** Select **Row**.
- **Operation:** Select **If Row Exists**.
- **Data table:** Select how to identify the data table to operate on:
- **From list:** Select the table from a drop-down list of all your data tables.
- **By Name:** Enter the name of your data table.
- **By ID:** Enter the ID of your data table
- **Must Match:** Select whether rows must match **Any Condition** or **All Conditions** defined in the next step.
- **Conditions:** Click **Add Condition** to define the data table rows to operate on. You can add multiple conditions. For each one:
- **Column:** Select the column you want to compare.
- **Condition:** Choose how to compare the column value: **Equals**, **Not Equals**, **Greater Than**, **Greater Than or Equal**, **Less Than**, **Less Than or Equal**, **Is Empty**, or **Is Not Empty**.
- **Value:** Enter the value to compare the column against. You can use a fixed value or an expression that references data from previous nodes. This field doesn't exist for **Is Empty** and **Is Not Empty** conditions.
## If row does not exist
Use this operation to check that no rows matching the defined condition(s) exists in a data table. If no matching row is found, the node outputs the same input item it received, unchanged. If a matching row exists, it outputs nothing.
Enter these parameters:
- **Resource:** Select **Row**.
- **Operation:** Select **If Row Does Not Exist**.
- **Data table:** Select how to identify the data table to operate on:
- **From list:** Select the table from a drop-down list of all your data tables.
- **By Name:** Enter the name of your data table.
- **By ID:** Enter the ID of your data table.
- **Must Match:** Select whether rows must match **Any Condition** or **All Conditions** defined in the next step.
- **Conditions:** Click **Add Condition** to define the data table rows to operate on. You can add multiple conditions. For each one:
- **Column:** Select the column you want to compare.
- **Condition:** Choose how to compare the column value: **Equals**, **Not Equals**, **Greater Than**, **Greater Than or Equal**, **Less Than**, **Less Than or Equal**, **Is Empty**, or **Is Not Empty**.
- **Value:** Enter the value to compare the column against. You can use a fixed value or an expression that references data from previous nodes. This field doesn't exist for **Is Empty** and **Is Not Empty** conditions.
## Insert row
Use this operation to insert a new row into a data table.
Enter these parameters:
- **Resource:** Select **Row**.
- **Operation:** Select **Insert**.
- **Data table:** Select how to identify the data table to operate on:
- **From list:** Select the table from a drop-down list of all your data tables.
- **By Name:** Enter the name of your data table.
- **By ID:** Enter the ID of your data table.
- **Mapping Column Mode:** Select whether to:
- **Map Each Column Manually:** Explicitly select which incoming data fields to map to which column. This allows you to map even when the incoming data field names don't match the data table column names. You can choose to delete certain values from the mapping.
- **Map Automatically:** Allow the node to automatically match data fields to columns by name. For successful mapping, the field names in your incoming data must exactly match the column names in the data table. All fields will be mapped.
### Insert row options
Use these options to further refine the action's behavior:
- **Optimize Bulk:** Enable to prevent inserted data from being returned. This improves bulk insert performance by up to 5x.
## Update row
Use this operation to update one or more rows in a data table, based on a defined condition(s).
Enter these parameters:
- **Resource:** Select **Row**.
- **Operation:** Select **Update**.
- **Data table:** Select how to identify the data table to operate on:
- **From list:** Select the table from a drop-down list of all your data tables.
- **By Name:** Enter the name of your data table.
- **By ID:** Enter the ID of your data table.
- **Must Match:** Select whether to update rows that match **Any Condition** or **All Conditions** defined in the next step.
- **Conditions:** Click **Add Condition** to define the data table rows to operate on. You can add multiple conditions. For each one:
- **Column:** Select the column you want to compare.
- **Condition:** Choose how to compare the column value: **Equals**, **Not Equals**, **Greater Than**, **Greater Than or Equal**, **Less Than**, **Less Than or Equal**, **Is Empty**, or **Is Not Empty**.
- **Value:** Enter the value to compare the column against. You can use a fixed value or an expression that references data from previous nodes. This field doesn't exist for **Is Empty** and **Is Not Empty** conditions.
- **Mapping Column Mode:** Select whether to:
- **Map Each Column Manually:** Explicitly select which incoming data fields to map to which column. This allows you to map even when the incoming data field names don't match the data table column names. You can choose to delete certain values from the mapping.
- **Map Auomatically:** Allow the node to automatically match data fields to columns by name. For successful mapping, the field names in your incoming data must exactly match the column names in the data table. All fields will be mapped.
### Update row options
Use these options to further refine the action's behavior:
- **Dry Run:** Enable to simulate updating, without modifying the table. The node returns rows that would be updated, including their state before and after the operation.
## Upsert row
Use this operation to upsert into a data table. If a row matching the defined condition(s) exists, it's updated with the provided values. If no matching row exists, a new row is created.
- **Resource:** Select **Row**.
- **Operation:** Select **Upsert**.
- **Data table:** Select how to identify the data table to operate on:
- **From list:** Select the table from a drop-down list of all your data tables.
- **By Name:** Enter the name of your data table.
- **By ID:** Enter the ID of your data table.
- **Must Match:** Select whether to upsert rows that match **Any Condition** or **All Conditions** defined in the next step.
- **Conditions:** Click **Add Condition** to define the data table rows to operate on. You can add multiple conditions. For each one:
- **Column:** Select the column you want to compare.
- **Condition:** Choose how to compare the column value: **Equals**, **Not Equals**, **Greater Than**, **Greater Than or Equal**, **Less Than**, **Less Than or Equal**, **Is Empty**, or **Is Not Empty**.
- **Value:** Enter the value to compare the column against. You can use a fixed value or an expression that references data from previous nodes. This field doesn't exist for **Is Empty** and **Is Not Empty** conditions.
- **Mapping Column Mode:** Select whether to:
- **Map Each Column Manually:** Explicitly select which incoming data fields to map to which column. This allows you to map even when the incoming data field names don't match the data table column names. You can choose to delete certain values from the mapping.
- **Map Auomatically:** Allow the node to automatically match data fields to columns by name. For successful mapping, the field names in your incoming data must exactly match the column names in the data table. All fields will be mapped.
### Upsert row options
Use these options to further refine the action's behavior:
- **Dry Run:** Enable to simulate the upsert operation without modifying the table. The node returns rows that would be affected, including their state before and after the operation.

View File

@@ -0,0 +1,72 @@
---
title: Data Table node table operations
description: Reference documentation for Data Table node table operations, including create, delete, list, and update.
contentType: [integration, reference]
priority: critical
---
Use table operations to create, delete, list and update data tables. Refer to the [Data Table node](/integrations/builtin/core-nodes/n8n-nodes-base.datatable/index.md) documentation for more information on the node itself.
## Create a data table
Use this operation to create a new data table.
Enter these parameters:
- **Resource:** Select **Table**.
- **Operation:** Select **Create**.
- **Name:** Enter a name for the data table, or define using an expression.
- **Columns:** Click **Add Column** to define parameters for the columns of the data table. You can add multiple columns. For each one:
- **Name:** Set a name for the column, or define using an expression.
- **Type:** Select the data type for the column: **Boolean**, **Date**, **Number**, or **String**.:
### Create a data table options
Use these options to further refine the action's behavior:
- **Reuse Existing Tables:** Enable to return an existing table if one exists with the same name, without throwing an error.
## Delete a data table
Use this operation to permanently delete an existing data table. This action can't be undone.
Enter these parameters:
- **Resource:** Select **Table**.
- **Operation:** Select **Delete**.
- **Data table:** Select how to identify the data table to delete:
- **From list:** Select the table from a drop-down list of all your data tables.
- **By Name:** Enter the name of your data table.
- **By ID:** Enter the ID of your data table
## List data tables
Use this operation to list existing data tables. You can return all tables, all tables up to a defined limit, or filter for tables to return.
Enter these parameters:
- **Resource:** Select **Table**.
- **Operation:** Select **List**.
- **Return All:** Enable to return all matching tables. Or, disable and enter a **Limit** for the number of tables to return, for example `50`.
### List data tables options
Use these options to further refine the action's behavior:
- **Filter by Name:** Enter a value or expression to return data tables whose names contain the specified text. Matching is case-insensitive.
- **Sort Field:** Select a field to sort results on.
- **Sort Direction:** Select whether to sort results in **Ascending** or **Descending** direction.
## Update a data table
Use this operation to update the name of an existing data tables.
Enter these parameters:
- **Resource:** Select **Table**.
- **Operation:** Select **Update**.
- **Data table:** Select how to identify the data table to update:
- **From list:** Select the table from a drop-down list of all your data tables.
- **By Name:** Enter the name of your data table.
- **By ID:** Enter the ID of your data table
- **New name:** Enter a value or expression to set a new name for the data table.

View File

@@ -222,7 +222,10 @@ nav:
- Common issues: integrations/builtin/core-nodes/n8n-nodes-langchain.chattrigger/common-issues.md
- integrations/builtin/core-nodes/n8n-nodes-base.converttofile.md
- integrations/builtin/core-nodes/n8n-nodes-base.crypto.md
- integrations/builtin/core-nodes/n8n-nodes-base.datatable/index.md
- Data Table:
- Data Table: integrations/builtin/core-nodes/n8n-nodes-base.datatable/index.md
- Row operations: integrations/builtin/core-nodes/n8n-nodes-base.datatable/rows.md
- Table operations: integrations/builtin/core-nodes/n8n-nodes-base.datatable/tables.md
- integrations/builtin/core-nodes/n8n-nodes-base.datetime.md
- integrations/builtin/core-nodes/n8n-nodes-base.debughelper.md
- integrations/builtin/core-nodes/n8n-nodes-base.set.md