> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/chinese/guan-li-yu-she-zhi/workflow/cards-overview/then/task/create-a-new-task-and-assign-it-to-the-user-in-document-field.md).

# 创建新任务并将其分配给文档字段中的用户

<figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-4b780782fa114c93a79ec6210d53992ef4c43c0a%2Fimage%20(366).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

## **用途：**

\*\*“创建基于字段的任务或通知”（Create Field-Based Task or Notification）\*\*工作流卡片用于动态创建任务或通知，并将其分配给文档特定字段中指定的用户。该卡片提供了可选的备用机制，以确保即使文档字段中没有指定有效用户，工作流也能顺利执行。

## **卡片组件：**

1. **标题**
   * **说明**：指定任务或通知的标题。
   * **详情**：用于命名和标识要创建的任务或通知。
2. **描述**
   * **说明**：提供任务或通知的补充详情。
   * **详情**：确保接收者了解任务或通知的用途和背景。
3. **优先级**
   * **说明**：定义任务或通知的紧急程度。
   * **选项**：
     * **高（High）**：需要立即处理。
     * **中（Medium）**：很重要，但紧急程度较低。
     * **低（Low）**：可以稍后处理。
4. **字段名称**
   * **说明**：指定用于分配任务或通知的文档字段。
   * **详情**：所选字段将动态确定任务或通知的接收用户。如果该字段为空或无效，任务或通知将分配给从下拉列表中选择的备用用户。
5. **电子邮件通知**
   * **说明**：设置是否通过电子邮件通知被分配的用户。
   * **选项**：
     * **True**：向被分配的用户发送电子邮件通知。
     * **False**：不发送电子邮件通知。
6. **备用用户**
   * **说明**：当文档字段中找不到有效用户时，可从下拉列表中选择一名用户来接收任务或通知。
   * **详情**：即使文档字段为空或无效，也能确保任务或通知得到分配。

## **版本 3 中的附加组件：**

1. **通知类型**
   * **说明**：指定卡片要创建任务还是发送通知。
   * **选项**：
     * **任务（Task）**：创建分配给指定用户的任务。
     * **通知（Notification）**：发送通知，而不是创建任务。

## **功能：**

* **条件评估**：\
  只有 **“Where”** 和 **“And Sections”** 均评估为真时，卡片才会执行操作。
* **创建任务或通知**：
  * 将任务或通知分配给文档字段中指定的用户。
  * 在版本 3 中，可选择创建任务或通知。
* **备用机制**：\
  如果文档字段中没有指定有效用户，卡片会将任务或通知分配给从下拉列表中选择的备用用户。
* **电子邮件通知**：\
  如果已配置，系统会向被分配的用户发送电子邮件通知。

## **设置和配置：**

1. **定义任务或通知详情**：输入标题、描述和优先级。
2. **选择文档字段**：选择用于指定任务或通知接收用户的字段。
3. **启用电子邮件通知**：指定是否向被分配的用户发送电子邮件通知。
4. **选择备用用户**：如果文档字段中没有指定有效用户，请从下拉列表中选择一名备用用户作为接收者。
5. **指定通知类型（版本 3）**：选择卡片要创建任务还是发送通知。

## **结论：**

\*\*“创建基于字段的任务或通知”（Create Field-Based Task or Notification）\*\*工作流卡片通过根据文档字段动态分配职责，简化了任务和通知管理。其备用用户机制以及版本 3 中增强的选项提供了灵活性，确保即使文档数据不完整，也始终能为任务或通知指定接收者。


---

# 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://docs.docbits.com/chinese/guan-li-yu-she-zhi/workflow/cards-overview/then/task/create-a-new-task-and-assign-it-to-the-user-in-document-field.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.
