Skip to content

数据绑定#

¥Data pinning

你可以在工作流开发过程中使用 'pin' 导入数据。数据锁定是指保存节点的输出数据,并在后续的工作流执行中使用已保存的数据,而不是获取新数据。

¥You can 'pin' data during workflow development. Data pinning means saving the output data of a node, and using the saved data instead of fetching fresh data in future workflow executions.

在处理来自外部源的数据时,你可以使用此方法避免重复向外部系统发出请求。这可以节省时间和资源:

¥You can use this when working with data from external sources to avoid having to repeat requests to the external system. This can save time and resources:

  • 如果你的工作流依赖外部系统(例如 Webhook 调用)来触发,则能够固定数据意味着你无需在每次测试工作流时都使用该外部系统。

¥If your workflow relies on an external system to trigger it, such as a webhook call, being able to pin data means you don't need to use the external system every time you test the workflow.

  • 如果外部资源有数据或使用量限制,在测试期间锁定数据可以避免占用你的资源限制。

¥If the external resource has data or usage limits, pinning data during tests avoids consuming your resource limits.

  • 你可以获取并锁定要测试的数据,从而确保所有工作流测试中的数据一致。

¥You can fetch and pin the data you want to test, then have confidence that the data is consistent in all your workflow tests.

你只能为具有单个主输出的节点固定数据("error" 输出不计入此目的)。

¥You can only pin data for nodes that have a single main output ("error" outputs don't count for this purpose).

For development only

数据锁定不适用于生产环境的工作流执行。这是一个用于在开发过程中帮助测试工作流程的功能。

¥Data pinning isn't available for production workflow executions. It's a feature to help test workflows during development.

Pin 数据#

¥Pin data

To pin data in a node:

  1. Run the node to load data.
  2. In the OUTPUT view, select Pin data Pin data icon. When data pinning is active, the button is disabled and a "This data is pinned" banner is displayed in the OUTPUT view.

Nodes that output binary data

You can't pin data if the output data includes binary data.

取消置顶数据#

¥Unpin data

启用数据锁定后,节点输出面板顶部会显示一个横幅,指示 n8n 已锁定数据。要取消数据锁定并在下次执行时获取新数据,请选择横幅中的“取消锁定”链接。

¥When data pinning is active, a banner appears at the top of the node's output panel indicating that n8n has pinned the data. To unpin data and fetch fresh data on the next execution, select the Unpin link in the banner.