---
title: "发布自动化流程"
description: "发布草稿，让触发器基于它运行，并选择仍在上一个版本上运行的注册是否迁移到新版本。"
sidebar:
  order: 2
area: flows
feature: automations
appPath: /flows/home
lastVerified: 2026-11-15
version: "2026-10-30"
audience: admin
related:
  - flows/automations/change-the-mode
  - flows/automations/automation-and-enrollment-states
  - activity/enrollments
intercom:
  - id: "11612966"
    title: How to create an Automation Flow (Pyn 2)
    url: https://intercom.help/pyn/en/articles/11612966-how-to-create-an-automation-flow-pyn-2
    note: draws on
  - id: "6024094"
    title: "If I turn on or add a Pyn in an enabled Automation, will employees already enrolled in the Automation receive that Pyn?"
    url: https://intercom.help/pyn/en/articles/6024094-if-i-turn-on-or-add-a-pyn-in-an-enabled-automation-will-employees-already-enrolled-in-the-automation-receive-that-pyn
    note: "Pyn 1 article, kept for reference"
translation:
  source: flows/automations/publish-an-automation.mdx
  sourceSha: 493d23f5d0b3592820e1847e64a794fcb7b051d9
---

对触发器、受众或步骤的编辑会在你操作时保存为草稿，但 Pyn 基于最新发布的版本进行评估和发送。发布会拍一张快照，也就是一个版本，并提示把活跃的注册迁移到它上面。

## 开始之前

- 发布需要 admin 或 owner 角色。
- 没有可发布的内容时，**Publish** 按钮是禁用的。让设置保持原样的编辑不算更改，例如把标题重新输入成原来的文字，或选中已经选中的选项。按钮旁边的“Draft autosaved”确认你的编辑已存储。
- Inactive 的自动化流程没有 **Publish** 按钮，而每个副本和每个目录模板都从 Inactive 开始。先选择 **Use This** 并挑选一个模式，或者使用 Automations 表格中该行 **...** 菜单上的 **Publish**。
- 没有收件人的步骤无法发布。如果 **Publish** 看起来没有任何反应，检查每个步骤的 **To** 字段。

## 步骤

1. 在 Pyn 中，打开左侧导航中的 **Flows**，然后打开 **Automations**，并选择该自动化流程。做出你要的更改。

2. 选择顶部的 **Publish**。要改为丢弃草稿，打开它旁边的箭头并选择 **Discard**。

3. 如果仍有注册在上一个版本上运行，**Update Enrollments** 对话框打开：“*n* enrollments are still active on the previous version. Select which ones to update to the latest published version.”每一行显示 **Enrollment** 及其 **Reference Date**。

![Publishing a change offers to update enrollments still running on the previous version.](https://support.pyn.ai/media/flows/automations/flows-automations-update-enrollments.png)

4. 每条注册都已勾选。取消勾选你想留在旧版本上的那些，然后选择 **Update Enrollments**。关闭对话框则让每条注册都留在它的旧版本上。

> **Note:** 更新注册会添加该版本中新增的步骤，重写尚未发送的步骤，并移除你删除的步骤。已发送、发送中或出错的内容不受影响，所以没有人会收到两次消息。

## 你应该看到什么

**Publish** 按钮再次被禁用，**Required** 从 Automations 表格的 **Publish** 列中消失。在[注册](https://support.pyn.ai/zh-cn/activity/enrollments/)下，已更新的注册显示新步骤；你没有更新的注册继续在旧版本上运行到完成。

你之后也可以更新注册。一旦自动化流程有了已发布的版本，模式按钮的菜单就提供 **Update Active Enrollments**。在有未发布编辑时，它显示为灰色并带有“Publish your changes first”。该对话框列出每条仍在运行的注册，各自带有 **Version**（**Latest**、**Earlier version** 或 **No version**）和 **Reference Date**，全部已勾选。取消勾选你想保持不变的那些，然后选择 **Update *n* enrollments**。规则与发布后的对话框相同：未发送的步骤迁移到已发布版本，已发送的步骤保持原样。

## 相关

- [更改自动化流程的模式](https://support.pyn.ai/zh-cn/flows/automations/change-the-mode/)，开启已发布的流程。
- [自动化流程与注册状态](https://support.pyn.ai/zh-cn/flows/automations/automation-and-enrollment-states/)，了解版本与注册的关系。
- [注册](https://support.pyn.ai/zh-cn/activity/enrollments/)，检查每个人将收到什么。
