保存和发布工作流程(Saving and publishing workflows)#
n8n 会在你编辑时每 5 秒自动保存一次工作流的更改。当你准备好将工作流投入生产时,发布你的工作流。这种方法可以在防止意外生产环境更改的同时,实现安全的迭代和审查。
🌐 n8n automatically saves your workflow changes every 5 seconds while you're editing. When you're ready to put the workflow into production, publish your workflow. This approach prevents accidental production changes while enabling safe iteration and review.
储蓄的运作方式(How saving works)#
在编辑时更改会每5秒自动保存,无需手动保存按钮,不过如果愿意,你仍然可以使用 Ctrl+S 或 Cmd+S。所有编辑内容在发布前都会保留为草稿。
🌐 Changes save automatically every 5 seconds while you edit. No manual save button is required, though you can still use Ctrl+S or Cmd+S if preferred. All edits remain in draft until you publish.
发布是如何运作的(How publishing works)#
发布会使你的工作流程生效并将其锁定到特定版本。生产环境的执行将使用此已发布的版本,而不是你最新的编辑。当你发布时,你的工作流程将启用以下功能:
🌐 Publishing makes your workflow live and locks it to a specific version. Production executions will use this published version, not your latest edits. When you publish, your workflow will enable the following:
- Webhook 和表单触发器将使用它们的生产 URL
- 计划将按你设定的时间运行
- 来自已连接应用的事件将触发此工作流
初始状态:你打开工作流程
状态已更改:自动保存的更改尚未发布
已发布状态:所有更改已发布
状态已更改:新更改尚未发布
协作的工作原理(How collaboration works)#
同一时间只能有一个人编辑工作流程。如果有人正在编辑:
🌐 Only one person can edit a workflow at a time. If someone else is currently editing:
- 您以只读模式查看工作流程
- 当他们停止编辑或变得不活跃时,编辑锁会释放
- 然后你可以接手编辑最新的更改
正在检查发布状态(Checking publishing status)#
在 工作流 页面上,每个工作流都会显示一个指示器,显示其是 已发布 还是 未发布。你还可以在画布标题栏上看到相同的指示器。
🌐 On the Workflows page, each workflow displays an indicator showing whether it is Published or Not Published. You will also be able to see the same indicator on the canvas header.
发布工作流程(Publishing a workflow)#
画布标题中的发布按钮在有未发布更改时会被启用。
🌐 The Publish button in the canvas header is enabled whenever there are unpublished changes.
每次你对工作流进行更改时,n8n 会自动将这些更改保存为工作流的新版本。只有在你在更改后发布工作流时,这些保存的版本才会在生产环境中生效。
🌐 Each time you make a change to a workflow, n8n autosaves those changes to a new version of the workflow. These saved versions go live in production only when you publish the workflow after the changes.
- 点击 发布 按钮以打开发布窗口
- 版本名称默认为 UUID。如果愿意,你可以自定义名称并添加版本描述。
- 点击 发布 以将你的更改应用到生产环境。生产环境的执行总是指向当前已发布的版本。
如果你只更新工作流设置,n8n 将重新发布版本,无需你采取任何操作。
管理版本历史(Managing version history)#
通过点击标题中的历史记录图标查看和管理版本历史。在版本历史视图中,你可以执行以下操作:
🌐 View and manage version history by clicking the history icon in the header. In the version history view, you can perform these actions:
- 取消发布工作流以将其从生产环境中移除
- 恢复到先前的版本。恢复操作可以让你在不影响生产执行的情况下处理某个版本。
- 发布工作流程的另一个版本
取消发布工作流(Unpublishing a Workflow)#
从以下位置取消发布工作流:
🌐 Unpublish a workflow from either:
- 工作流程设置菜单
- 版本历史页面(已发布版本的取消发布操作)



