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

# Extract from File

> Configure a workflow step that fetches a file from a URL and extracts rows or text for later steps

Use **Extract from File** when you want a workflow step to read structured or text data from a public file URL inside Fetch Hive.

## Configuration

| Option              | Required     | Description                                                                                           |
| ------------------- | ------------ | ----------------------------------------------------------------------------------------------------- |
| Name                | No           | Label for the step in the workflow canvas.                                                            |
| File URL            | Yes          | URL in **File URL**. This field supports workflow variables through **Insert Variable**.              |
| File format         | No           | Auto-detect from the URL extension, or choose JSON, CSV, XLSX, XLS, HTML, DOCX, PDF, or XML manually. |
| Sheet index         | Tabular only | Zero-based sheet index for XLS and XLSX files. Defaults to `0`.                                       |
| First row is header | Tabular only | When enabled, CSV and spreadsheet files use the first row as column names.                            |
| 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...**.

Supported formats:

| Format          | Output shape           |
| --------------- | ---------------------- |
| CSV, XLSX, XLS  | Array of row objects   |
| JSON, XML       | Parsed object or array |
| HTML, DOCX, PDF | Plain text string      |

Tabular outputs are clamped to your plan iteration limit and a platform safety cap of 1,000 rows.

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

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

For CSV or spreadsheet files, `{{STEP_IDENTIFIER.output}}` is an array you can pass directly into an **Iteration** step:

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

Inside the iteration body, reference fields from each row:

```text theme={null}
{{contacts_loop.item.name}}
{{contacts_loop.item.website}}
```

## Example

Add **Extract from File** from the **Utilities** group.

Set **File URL** to a public CSV such as `https://example.com/contacts.csv`.

Keep **File format** on **Auto-detect** and leave **First row is header** enabled.

Add an **Iteration** step with source `{{extract_contacts.output}}`.

Inside the loop:

1. **Website Scrape** on `{{contacts_loop.item.website}}`
2. **AI Prompt** to write a unique outreach fact from the scrape result

After the loop, use **Data Transform** or **Google Sheets** to collect enriched rows.

## Notes

* Use a directly reachable file URL. This step fetches the file over HTTP; it does not upload files from your computer.
* HTML extraction returns full-page text, not table rows.
* PDF and DOCX extraction returns text suitable for downstream **AI Prompt** steps.

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