> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchhive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Docs

> 配置一个使用已连接的 Google 账户从工作流内容创建 Google Doc 的工作流步骤

# Google Docs

当你希望工作流步骤从工作流输出创建新的 Google Doc 时,请使用 **Google Docs**。

## 配置

| 选项                                                                                                  | 是否必填 | 说明                                                   |
| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------------- |
| Name                                                                                                | 否    | 步骤在工作流画布中的标签。                                        |
| Integration Authorization                                                                           | 是    | 在 **Authentication** 中选择的已连接 Google 账户。              |
| Action                                                                                              | 是    | Google Docs 操作。当前编辑器显示 **Create Document**。          |
| Title                                                                                               | 是    | 在 **Title** 中输入的值。                                   |
| Document Text                                                                                       | 是    | 在 **Document Text** 中输入的值。                           |
| Permissions                                                                                         | 否    | 在 **Permissions** 中选择的访问级别。                          |
| When the step fails                                                                                 | 否    | 控制此步骤失败时工作流应 **Terminate Workflow** 还是 **Continue**。 |
| 在配置此步骤之前,请在工作区的 **Integrations** 中连接 Google。如果没有可用的活动 Google Docs 连接,该步骤会显示警告并链接到 **Integrations**。 |      |                                                      |

如果 **Title** 和 **Document Text** 的值应来自起始输入或早前步骤,请使用其旁边的 **Insert Variable** 按钮。

**Document Text** 字段支持 markdown 格式。

## 输出

此步骤存储一个包含已创建 Google Doc 详细信息的对象,包括:

* `document_id`
* `document_url`
* `response`

在后续步骤中使用完整输出引用:

```text theme={null}
{{STEP_IDENTIFIER.output}}
```

要直接引用已创建文档的 URL,使用以下路径:

```text theme={null}
{{step_2.output.document_url}}
```

在测试运行后使用变量选择器以确认你的工作流中可用的确切键。

## 示例

打开 **Integrations** 并按需连接 Google。

将 **Google Docs** 添加到你的工作流,并在 **Authentication** 中选择账户。

保持 **Action** 设置为 **Create Document**。

填写 **Title** 和 **Document Text**,按需插入工作流变量。

根据你希望共享文档的方式选择 **Permissions**。如果设置为 **Public**,任何拥有链接的人都可以查看文档。

点击 **Run** 测试步骤,然后如果你希望将已创建的文档 URL 或其他响应字段传递给后续步骤,请打开 **Output**。

{/* Add screenshot: Google Docs step settings with Title, Document Text, and Permissions */}

## 备注

* 当前编辑器公开一个 Google Docs 操作:**Create Document**。
* **Document Text** 在步骤编辑器中支持 markdown。
* 当后续步骤需要共享或存储文档链接时,已创建的文档 URL 很有用。

另见:[Integrations](../../../workspace/integrations)、[创建和编辑](../../creating-and-editing) 和 [测试与迭代](../../testing-and-iteration)
