> For the complete documentation index, see [llms.txt](https://academy.shade.inc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.shade.inc/shade-academy/shade-academy-zh/zi-dong-hua-yu-zi-ding-yi-dui-xiang/zi-dong-hua.md).

# 自动化

Automations 是一个直接内置在 Shade 中的无代码工作流构建器。你可以定义当你的云盘中发生某些事情时应该执行什么规则，Shade 会在后台自动运行它们——无需第三方工具，也无需代码。

每个自动化都由一个 **触发器** （启动它的事件）和一个或多个 **动作** （Shade 的响应）。你可以使用可视化的块式编辑器来构建自动化。

{% embed url="<https://youtu.be/PIK9cQBpcSE?si=f7nBru4WD7SK9zjY>" %}

### 自动化如何运作

* 选择一个 **触发器** - 启动自动化的事件
* 添加一个或多个 **动作** - 串联起来按顺序运行
* 保存后，只要触发器触发，自动化就会自动运行

<figure><img src="https://3843445310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUNq6h2Bfw7aAK0J2ffnZ%2Fuploads%2F1Cs5qy7BCtq7vD9CF9ws%2FAutomations%200.gif?alt=media&amp;token=2405d772-6b17-475a-bf76-1d790e788786" alt=""><figcaption></figcaption></figure>

### 触发器

触发器是你云盘中的事件，包括：

* 文件已上传
* 资产已更新
* 资产已重命名
* 文件已添加到集合中
* 资产收到特定的元数据修改

<figure><img src="https://3843445310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUNq6h2Bfw7aAK0J2ffnZ%2Fuploads%2FgJ0O6bl6f3RcYwf7OiQT%2FAutomations%201.gif?alt=media&amp;token=c75a9235-0f85-4406-8a86-46711e69e581" alt=""><figcaption></figcaption></figure>

### 动作

动作通常就是你已经可以在 Shade 中手动完成的事情。它们包括：

* 将文件添加到集合中
* 添加评论
* 创建或更新一个 **自定义对象** 记录
* 生成分享链接
* 发送电子邮件通知（带品牌标识且可自定义）

<figure><img src="https://3843445310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUNq6h2Bfw7aAK0J2ffnZ%2Fuploads%2F95JU1hzganNGVCaP7Pgc%2FAutomations%202.gif?alt=media&amp;token=bea74699-1295-47a0-bb5f-75eb3a05b6e7" alt=""><figcaption></figcaption></figure>

### 构建自动化

使用可视化的块式编辑器构建自动化：

* 创建一个新的自动化
* 选择你的触发器（例如， **文件已添加到集合中**）并将其指向相关集合
* 按它们应运行的顺序添加你的动作（例如， **生成分享链接** -> **发送邮件**)
* 保存

### 示例工作流

* **两阶段审批：** 当某个资产的 **审批状态** 变为 **审阅中**时，自动生成一个分享链接并向内部审阅者发送邮件。当它切换为 **已批准**时，将最终分享链接发送给外部审阅者——两个阶段，零人工交接。
* **交付包生成器：** 当资产移动到 **可交付** （或被添加到交付集合中）时，自动生成正确的分享链接，并发送一封交付邮件（可选附带 Slack 提醒），其中包含链接、所含资产以及任何备注。这会把“导出 + 发送链接”变成一次状态变更。
* **权限/使用到期执行：** 按每日计划（或当权限记录更新时），自动查找使用权即将到期的资产并提醒所有者。当权限到期时，自动限制外部分享（并可选将资产移动到受限区域），这样过期媒体就不会继续流转。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://academy.shade.inc/shade-academy/shade-academy-zh/zi-dong-hua-yu-zi-ding-yi-dui-xiang/zi-dong-hua.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
