> 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/guides/guides-zh/zi-dong-hua/ni-de-di-yi-ge-zi-dong-hua.md).

# 你的第一个自动化

每当有新上传时，自动将其发送到“待审核”集合。十分钟，无需代码。

**结果：** 上传到你选择的文件夹中的每个文件都会显示在一个 **待审核** 集合中，因此没有任何新内容会漏过审核人员。

**适用于：** 适用于尚未构建自动化的任何具有驱动器编辑权限的人。本指南还涵盖其他自动化配方假定你已了解的编辑器基础知识。

**时间：** 大约 10 分钟。

## 开始之前

* 拥有该驱动器的编辑权限。
* 创建文件应进入的集合。在左侧边栏中，打开你的驱动器，找到 **集合**，然后点击 **+**。将其命名为 **待审核**。参见 [创建资产合集](https://academy.shade.inc/sharing-and-collaboration/creating-asset-collections).
* 可选：浏览 [自动化](https://academy.shade.inc/automations-and-custom-objects/automations) 以查看触发器和操作的完整列表。

## 工作原理

每个自动化都是一个 **触发器** （启动它的事件），后跟一个或多个 **操作** （Shade 的响应操作）。这个只有一个操作：

```mermaid
flowchart LR
  T["触发器：资源已上传（传入文件夹）"] --> A["操作：添加到集合（待审核）"]
```

## 步骤

{% stepper %}
{% step %}

### 创建自动化

在左侧边栏中，打开你的驱动器并点击 **自动化**。点击 **新建自动化**，然后点击顶部的名称并将其重命名为能说明其功能的内容，例如 `新上传 → 待审核`.
{% endstep %}

{% step %}

### 选择触发器

选择 **文件已上传** （在完整触发器列表中列为 **资产上传** ）。

在 **上传位置**下，选择要监视的文件夹，例如 `传入`。开启 **包含子文件夹** 如果文件会落入嵌套文件夹中。将位置留空可监视整个驱动器。

{% hint style="info" %}
监视特定文件夹通常比监视整个驱动器更好。这样可以防止导出、渲染以及其他自动化创建的文件触发此自动化。
{% endhint %}
{% endstep %}

{% step %}

### 添加操作

点击 **+** ，位于触发器下方，并选择 **添加到集合**.

* **集合：** 选择 **待审核**.
* **资产：** 点击该字段，输入 `{`，然后从触发器中选择已上传的资源。

在任何字段中输入 `{` 会列出前面步骤中的值。你在构建的每个自动化中都会用到这些变量。
{% endstep %}

{% step %}

### 保存并激活

点击 **保存**。如果 **保存** 或 **启用** 变成灰色，说明某个步骤还有必填字段未填写。将鼠标悬停在按钮上即可查看缺少什么。

然后点击 **启用**。新自动化最初为草稿，在你激活之前不会运行。
{% endstep %}

{% step %}

### 测试它

将文件上传到被监视的文件夹中。几秒钟内，它应会显示在 **待审核**.

打开该自动化，并从 **编辑器** 设置为 **运行** 切换到以查看其运行历史。每次运行都会列出每个步骤及其输出。如果某次运行失败，失败的步骤会显示错误。
{% endstep %}
{% endstepper %}

## 变体

* **仅限某些文件类型：** 添加一个 **筛选器** 在触发器和操作之间添加一个步骤，因此只有视频（或只有图片）会继续。
* **不同文件夹，不同集合：** 使用 **如果 / 否则** 或 **切换** 使用它将每个文件夹的上传路由到各自的集合中。
* **顺便通知某人：** 添加一个 **发送电子邮件** 在之后添加一个步骤 **添加到集合** 以通知审核人员。
* **在审核时触发，而不是在上传时：** 使用 **资产已更新** 带有特定字段和值，例如 **状态** 更改为 **需要审核**.

## 相关文章

* [自动整理新上传](/guides/guides-zh/zi-dong-hua/zi-dong-zheng-li-xin-shang-chuan-nei-rong.md)
* [告诉客户他们的文件已准备就绪](/guides/guides-zh/zi-dong-hua/gao-su-ke-hu-ta-men-de-wen-jian-yi-zhun-bei-jiu-xu.md)
* [客户审阅流程](/guides/guides-zh/shen-he-he-ke-hu-jiao-fu/ke-hu-shen-yue-liu-cheng.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://academy.shade.inc/guides/guides-zh/zi-dong-hua/ni-de-di-yi-ge-zi-dong-hua.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
