> ## 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.

# Document URL to Text

> 配置一个从 URL 获取文档并为后续步骤提取文本的工作流步骤

# Document URL to Text

当你希望工作流步骤从公共 URL 获取文档并在 Fetch Hive 中提取其文本时,请使用 **Document URL to Text**。

## 配置

| 选项                                             | 是否必填 | 说明                                                         |
| ---------------------------------------------- | ---- | ---------------------------------------------------------- |
| Name                                           | 否    | 步骤在工作流画布中的标签。                                              |
| Document URL                                   | 是    | **Document URL** 中的 URL。此字段通过 **Insert Variable** 支持工作流变量。 |
| When the step fails                            | 否    | 控制此步骤失败时工作流应 **Terminate Workflow** 还是 **Continue**。       |
| 从 **Search steps...** 的 **Utilities** 分组添加此步骤。 |      |                                                            |

**Document URL** 字段接受直接文档链接。编辑器中的帮助文本说明支持 PDF、DOCX、PPTX、XLSX 和其他文档格式。

## 输出

点击步骤标题中的 **Run** 来测试步骤。运行完成后,Fetch Hive 会在 **Output** 中显示提取的结果。

在后续步骤中使用变量选择器插入该次运行的确切输出路径。基础引用为:

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

如果你只需要完整的提取结果,直接引用基础输出:

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

使用变量选择器检查你的工作流中文档结果可用的任何嵌套字段。

## 示例

从 **Search steps...** 的 **Utilities** 分组中添加 **Document URL to Text**。

将 **Name** 设置为类似 `Read contract PDF` 的内容。

将文档链接粘贴到 **Document URL** 中。如果链接来自早前步骤,点击 **Insert Variable** 并改为添加该值。

选择 **When the step fails** 时应执行的行为。

点击 **Run** 并在 **Output** 中查看提取的结果,然后再将其传入后续步骤,如 **AI Prompt**。

{/* Add screenshot: Document URL to Text settings sheet with Document URL field */}

## 备注

* 使用可直接访问的文档 URL。此步骤设计用于从 URL 获取文档,而不是从本地计算机上传文件。
* 设置面板支持常见的文档格式,包括 PDF、DOCX、PPTX 和 XLSX。
* 如果文档需要身份验证或私有会话,请确保你传递的 URL 实际上可供工作流步骤访问。

另见:[创建和编辑](../../creating-and-editing)、[测试与迭代](../../testing-and-iteration) 和 [错误处理](../../error-handling)
