---
title: "教程：生日与周年纪念"
description: 设置每年运行的工作周年纪念和生日自动化流程，提前一周通知经理并在当天庆祝，里程碑年份单独处理。
sidebar:
  order: 1
area: flows
feature: automations
appPath: /flows/home
lastVerified: 2026-11-15
version: "2026-10-23"
audience: admin
related:
  - flows/automations/configure-a-date-trigger
  - flows/automations/scheduling-internals
  - flows/automations/create-an-automation
  - flows/steps
intercom:
  - id: "6024165"
    title: Enable the Birthday Moment Automation
    url: https://intercom.help/pyn/en/articles/6024165-enable-the-birthday-moment-automation
    note: "Pyn 1 article, kept for reference"
translation:
  source: flows/automations/tutorial-birthdays-and-anniversaries.mdx
  sourceSha: 8442cc4c9d3298fc8ee90788ce63f07a8b608643
---

**目标**：没有哪个人的工作周年纪念或生日会被忽略，而且经理绝不会到当天才知道。**时间**：约 45 分钟。**最终成果**：三个自动化流程：**Work anniversary**（每年）、**Milestone anniversary**（每 5 年）和 **Birthday**（来自模板目录），每个都提前一周给经理一条预先通知，并在当天给本人发一条消息。

[Video: Anniversaries by date trigger, birthdays from the template catalogue.](https://support.pyn.ai/media/flows/automations/flows-automations-tutorial-anniversaries.mp4)

## 开始之前

- 所有人的 **Start Date** 都已同步。对于生日，你的 HRIS 必须提供 **Birthday**；在 **Directory** 中打开几份个人资料来确认。生日只存储月和日。
- Slack 已连接，所以庆祝可以是一条私信，里程碑可以是一条频道帖子。电子邮件同样可行；把全文中的 **Send Direct Message** 换成 **Send Email to Employee** 即可。
- 决定在生日上的隐私立场。目录中的 **Birthday opt-in** 模板会先征求人们的意见；本教程排除名为 **No birthday messages** 的静态群组中的所有人。

## 第 1 章：每年的工作周年纪念

1. 在 Pyn 中，打开左侧导航中的 **Flows**，然后打开 **Automations**，并选择 **Create New**。

2. 在 **Dates and Schedules** 下，选择 **Upcoming Anniversary**（“The upcoming anniversary of a start date.”）。把自动化流程命名为 `Work anniversary`。

3. 在触发器的 **Configure** 标签页上，把 **This flow starts** 设为 **1 week before**，重复设置保留为 **every year**。流程现在在每个周年纪念日的七天前开始，而周年纪念日本身是参考日期，所以“on the day of”指的就是周年纪念日。

![在 Configure 上，This flow starts 是偏移，它下面的字段是重复设置。](https://support.pyn.ai/media/flows/automations/flows-automations-trigger-configure.png)

4. 打开 **Audience**，把 **Lifecycle** 设为 **Current**。如果你加上 **On leave**，休假中的人也会被包含；大多数团队都会这么做。

5. 选择 **Add a step**，然后选择 **Send Direct Message**。把 **To** 设为 **Manager**，安排在 **7 days before** 的 09:00（**Recipient Time Zone**），并命名为 `Anniversary heads-up`：

> 提前告诉你：@principal.preferredName 的工作周年纪念日是 @date.reference。到那天，入职就满 @principal.tenure 了。
>
> 来自你的一句简短而具体的感谢，比我们能自动化的任何内容都更打动人。两个想法：提一件对方今年做的、真正重要的事，并在团队看得到的地方分享。

6. 添加第二个 **Send Direct Message** 步骤。把 **To** 设为 **Employee**，安排在 **on the day of** 的 09:00（**Recipient Time Zone**），并命名为 `Happy anniversary`：

> @principal.preferredName，工作周年快乐！今天是你在 @company.name 满 @principal.tenure 的日子。感谢你这一年为团队带来的一切。

7. 选择 **Publish**，然后选择模式按钮、**Change Mode**、**Automated**。

> **Note:** **every year** 在第一个周年纪念日及之后的每一个周年纪念日触发，永远不会在入职日期当天触发。如果你的入职流程已经标记了满一年这个节点，选择 **every year after the first**，这样两者永远不会撞车。

## 第 2 章：里程碑周年纪念

重要的年份值得的不只是一条私信。第二个自动化流程把里程碑逻辑分开，让每年的流程保持简单。

1. 选择 **Create New**，然后选择 **Upcoming Milestone Anniversary**（“A significant anniversary (e.g. 5 or 10 years)”）。命名为 `Milestone anniversary`。

2. 在 **Configure** 上，把 **This flow starts** 设为 **2 weeks before**，重复设置保留为 **every 5 years**。第 5、10、15 年等会触发；每年的流程在这些日子也会触发，所以要决定是两个都保留，还是把 **Milestone anniversary** 的收件人加到每年流程的一个排除群组中。

3. 添加一个发给 **Manager** 的 **Send Direct Message** 步骤，**14 days before** 的 09:00，命名为 `Milestone coming up`。请他们安排一份礼物或一个与团队共度的时刻，并在需要预算时告诉人事团队。

4. 添加一个 **Post to Channel** 步骤（在已启用 Post to Channel 的工作区中；否则用一条发给经理的 **Send Direct Message**），发到你的团队或公司频道，**on the day of** 的 10:00，命名为 `Celebrate a milestone`：

> 今天 @principal.preferredName 在 @company.name 迎来 @principal.tenure 的里程碑。请和我们一起送上祝贺和感谢！

5. 选择 **Publish**，然后选择 **Change Mode**、**Verification**。里程碑很少见，所以在切换到 **Automated** 之前，先在 **Needs Review** 中审核第一条。

## 第 3 章：来自模板目录的生日

触发器选择器中没有 Birthday 这一行，因为生日没有可以起算的年份。**Birthday celebration** 模板自带现成的生日触发器：它在 **1 week before** 开始，并 **every year** 重复。

1. 在 **Automations** 上，选择 **Create New** 旁边的箭头，然后选择 **Add from Template**。

2. 找到 **Birthday celebration** 并选择它。Pyn 把它复制到你的工作区的 **Birthday** 时刻下并打开它，处于未激活状态，带两个 Slack 步骤：一个在一周前发给经理，一个在当天发给员工。

![Add from Template copies a ready-made automation into your workspace.](https://support.pyn.ai/media/flows/automations/flows-automations-add-from-template.png)

3. 选择触发器卡片。**Configure** 显示“This flow runs based on the employee's **Birthday**. This is the birthday on the Employee Record.”，重复设置只提供 **every year**。

4. 打开 **Audience**。把 **Lifecycle** 设为 **Current**，并在 **Excluded** 下添加你的 **No birthday messages** 群组。

5. 打开每个步骤，用你的语气重写文案。给员工的消息保持简短，并避免提及年龄：

> @principal.preferredName，生日快乐！祝你度过美好的一天。来自 @company.name 的全体同事。

6. 选择 **Use This** 并选择 **Automated**，然后选择 **Publish**。

> **Tip:** 想让人们主动选择加入而不是退出？再添加 **Birthday opt-in** 模板。它会询问每位员工是否愿意收到生日消息；把回答愿意的人放进一个静态群组，并把该群组用作 **Birthday celebration** 的 **Included** 受众。

## 你应该看到什么

在 **Enrollments** 下，人们在每个周年纪念日和生日的七天前被注册，以周年纪念日或生日作为 **Reference Date**。经理的消息显示为在注册当天已投递，员工的消息显示为安排在周年纪念日或生日当天。2 月 29 日入职的人在非闰年的 2 月 28 日得到庆祝。

## 后续步骤

- 如果模板没有替你完成，把这三个自动化流程附加到你[旅程](https://support.pyn.ai/zh-cn/journey/)地图上的 **Birthday**、**Anniversary** 和 **Milestone anniversary** 时刻。
- 阅读[参考日期和时间安排](https://support.pyn.ai/zh-cn/flows/automations/scheduling-internals/)，准确了解重复年份和闰日是如何计算的。

## 相关

- [配置日期触发器](https://support.pyn.ai/zh-cn/flows/automations/configure-a-date-trigger/)，了解偏移和重复设置。
- [参考日期和时间安排](https://support.pyn.ai/zh-cn/flows/automations/scheduling-internals/)，了解年份计数规则。
- [创建自动化流程](https://support.pyn.ai/zh-cn/flows/automations/create-an-automation/)，了解模板目录。
- [步骤和消息](https://support.pyn.ai/zh-cn/flows/steps/)，了解 Slack 发件人、频道和令牌。
