Skip to content

导出和导入工作流#

¥Exporting and importing workflows

本章将介绍如何导出和导入工作流。

¥In this chapter, you will learn how to export and import workflows.

导出和导入工作流#

¥Exporting and importing workflows

你可以将 n8n 工作流以 JSON 文件的形式保存到本地。如果你想与他人共享工作流程或从他人导入工作流程,这将非常有用。

¥You can save n8n workflows locally as JSON files. This is useful if you want to share your workflow with someone else or import a workflow from someone else.

Sharing credentials

Exported workflow JSON files include credential names and IDs. While IDs aren't sensitive, the names could be, depending on how you name your credentials. HTTP Request nodes may contain authentication headers when imported from cURL. Remove or anonymize this information from the JSON file before sharing to protect your credentials.

Import/Export menu
Import & Export workflows menu

你可以通过三种方式导出和导入工作流:

¥You can export and import workflows in three ways:

  • 在编辑器 UI 菜单中:

¥From the Editor UI menu:

  • 导出:从顶部导航栏右上角选择三个点,然后选择“下载”。这将把你当前的工作流以 JSON 文件的形式下载到你的计算机上。

    ¥Export: From the top navigation bar, select the three dots in the upper right, then select Download. This will download your current workflow as a JSON file on your computer.

  • 导入:从顶部导航栏右上角选择三个点,然后选择“从 URL 导入”(导入已发布的流程)或“从文件导入”(将流程作为 JSON 文件导入)。

    ¥Import: From the top navigation bar, select the three dots in the upper right, then select Import from URL (to import a published workflow) or Import from File (to import a workflow as a JSON file).

  • 在编辑器 UI 画布中:

¥From the Editor UI canvas:

  • 导出:选中画布上的所有节点,然后使用 ++Ctrl+C++ 复制工作流 JSON。你可以将其粘贴到文件中或直接与他人共享。

    ¥Export: Select all the nodes on the canvas and use Ctrl+C to copy the workflow JSON. You can paste this into a file or share it directly with other people.

  • 导入:你可以使用 Ctrl+V 将复制的工作流 JSON 直接粘贴到画布中。

    ¥Import: You can paste a copied workflow JSON directly into the canvas with Ctrl+V.

  • 从命令行获取:

¥From the command line: