# Document to Text

Use **Document URL to Text** when you want a workflow step to fetch a document from a public URL and extract its text inside Fetch Hive.

## Configuration

| Option                                                             | Required | Description                                                                                     |
| ------------------------------------------------------------------ | -------- | ----------------------------------------------------------------------------------------------- |
| Name                                                               | No       | Label for the step in the workflow canvas.                                                      |
| Document URL                                                       | Yes      | URL in **Document URL**. This field supports workflow variables through **Insert Variable**.    |
| When the step fails                                                | No       | Controls whether the workflow should **Terminate Workflow** or **Continue** if this step fails. |
| Add this step from the **Utilities** group in **Search steps...**. |          |                                                                                                 |

The **Document URL** field accepts a direct document link. The helper text in the editor calls out support for PDF, DOCX, PPTX, XLSX, and other document formats.

## Output

Click **Run** in the step header to test the step. Fetch Hive shows the extracted result in **Output** after the run completes.

Use the variable picker in a later step to insert the exact output path for your run. The base reference is:

```
{{STEP_IDENTIFIER.output}}
```

If you only need the full extracted result, reference the base output directly:

```
{{step_2.output}}
```

Use the variable picker to inspect any nested fields available for the document result in your workflow.

## Example

Add **Document URL to Text** from the **Utilities** group in **Search steps...**.

Set **Name** to something like `Read contract PDF`.

Paste the document link into **Document URL**. If the link comes from an earlier step, click **Insert Variable** and add that value instead.

Choose what should happen in **When the step fails**.

Click **Run** and review the extracted result in **Output** before passing it into a later step such as **AI Prompt**.

## Notes

* Use a directly reachable document URL. This step is designed for fetching a document from a URL, not for uploading a file from your local machine.
* The settings sheet supports common document formats including PDF, DOCX, PPTX, and XLSX.
* If a document requires authentication or a private session, make sure the URL you pass is actually accessible to the workflow step.

See also: [Creating and Editing](/workflows/creating-and-editing.md), [Testing and Iteration](/workflows/testing-and-iteration.md), and [Error Handling](/workflows/error-handling.md)


---

# Agent Instructions: 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:

```
GET https://docs.fetchhive.com/workflows/workflow-steps/utility/document-to-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
