数据表#
¥Data tables
概述#
¥Overview
数据表将数据存储集成到你的 n8n 环境中。使用数据表,你可以直接在工作流中保存、管理和交互数据,而无需依赖外部数据库系统,例如:
¥Data tables integrate data storage within your n8n environment. Using data tables, you can save, manage, and interact with data directly inside your workflows without relying on external database systems for scenarios such as:
- 在同一项目的不同工作流中持久化数据。
¥Persisting data across workflows in the same project
- 存储用于防止重复运行或控制工作流触发器的标记。
¥Storing markers to prevent duplicate runs or control workflow triggers
- 在工作流中重用提示或消息
¥Reusing prompts or messages across workflows
- 存储 AI 工作流的评估数据。
¥Storing evaluation data for AI workflows
- 存储工作流执行生成的数据。
¥Storing data generated from workflow executions
- 合并来自不同来源的数据以丰富你的数据集。
¥Combining data from different sources to enrich your datasets
- 创建查找表,作为工作流中的快速参考点
¥Creating lookup tables as quick reference points within workflows
如何使用数据表#
¥How to use data tables
处理数据表分为两个部分:在工作流中创建和与之交互。
¥There are two parts to working with data tables: creating them and interacting with them in workflows.
步骤 1:创建数据表#
¥Step 1: Creating a data table
- 在你的 n8n 项目中,选择“数据表”选项卡。
¥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.
- 输入表格的描述性名称。
¥Enter a descriptive name for your table.
在出现的表格视图中,你可以:
¥In the table view that appears, you can:
-
添加并重新排序列以整理数据
¥Add and reorder columns to organize your data
-
添加、删除和更新行
¥Add, delete, and update rows
-
编辑现有数据
¥Edit existing data
步骤 2:在工作流中与数据表交互#
¥Step 2: Interacting with Data tables in workflows
使用数据表节点在工作流中与数据表交互,该节点允许你检索、更新和操作存储在数据表中的数据。
¥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.
查看 数据表节点。
¥See Data table node.
数据表的注意事项和局限性#
¥Considerations and limitations of data tables
- 数据表适用于轻量级到中等规模的数据存储。默认情况下,数据表的大小不能超过 50MB。在自托管环境中,你可以使用环境变量
N8N_DATA_TABLES_MAX_SIZE_BYTES来增加此默认大小限制。
¥Data tables are suitable for light to moderate data storage. By default, a data table can't contain more than 50MB of data. In self-hosted environments, you can increase this default size limit using the environment variable N8N_DATA_TABLES_MAX_SIZE_BYTES.
- 当数据表接近存储空间限制的 80% 时,系统会发出警告提醒。当你达到存储限制时,将显示最终警告。超出此限制将禁用手动向表中添加数据,并在尝试插入或更新数据时导致工作流执行错误。
¥When a data table approaches 80% of your storage limit, a warning will alert you. A final warning appears when you reach the storage limit. Exceeding this limit will disable manual additions to tables and cause workflow execution errors during attempts to insert or update data.
- 默认情况下,在项目中创建的数据表对该项目中的所有团队成员都可访问。
¥By default, data tables created within a project are accessible to all team members in that project.
- 在个人空间创建的表格只有创建者才能访问。
¥Tables created in a Personal space are only accessible by their creator.
数据表与变量#
¥Data tables versus variables
| 功能 | 数据表 | 变量 |
|---|---|---|
| 统一表格视图 | ✓ | ✗ |
| 行列关系 | ✓ | ✗ |
| 跨项目访问 | ✗ | ✓ |
| 单个值显示 | ✗ | ✓ |
| 针对短值进行优化 | ✗ | ✓ |
| 结构化数据 | ✓ | ✗ |
| 范围到项目 | ✓ | ✗ |
| 使用这些值作为表达式 | ✗ | ✓ |
导出和导入数据#
¥Exporting and importing data
要在 n8n 和外部工具之间传输数据,请使用以下工作流:
¥To transfer data between n8n and external tools, use workflows that:
- 从数据表中获取数据。
¥Retrieve data from a data table. 2. 使用 API 或文件导出功能导出凭据。
¥Export it using an API or file export. 3. 将数据相应地导入到另一个系统或数据表中。
¥Import data into another system or data table accordingly.

