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

# Generate File

> Configure a workflow step that generates a PDF, Word, Excel, or CSV file and stores it in your media library

Use **Generate File** when you want a workflow step to create a downloadable file that later steps or runs can reference. The generated file is stored in the workspace media library.

## Configuration

| Option              | Required | Description                                                                                      |
| ------------------- | -------- | ------------------------------------------------------------------------------------------------ |
| Name                | No       | Label for the step in the workflow canvas.                                                       |
| File format         | Yes      | Output format: **PDF**, **Word (DOCX)**, **Excel (XLSX)**, or **CSV**.                           |
| Filename            | No       | Optional name for the generated file. Leave blank to use the step identifier.                    |
| Content             | Yes      | Source content for the file. 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 **Generation** group in **Search steps...**.

### Content by format

* **PDF** and **Word (DOCX)** use markdown. Headings, lists, tables, and emphasis are converted into the generated document.
* **Excel (XLSX)** and **CSV** use CSV text. Put headers in the first row, then one record per line.

Use **Insert Variable** to combine text from **Inputs** or earlier **Workflow Steps** before you generate the file.

## Output

Click **Run** in the step header to test the step. Fetch Hive shows the generated file in **Output** after the run completes. The file is also saved to the workspace media library.

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

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

Use the variable picker if you need a deeper field or file reference from the generated result.

## Cost

Each run of this step costs **1 task**, for every output format.

## Example

Add **Generate File** from the **Generation** group in **Search steps...**.

Set **Name** to something like `Create weekly report`.

Choose **PDF** as the file format.

Write the document in **Content** with markdown headings, lists, and inserted workflow values such as `{{step_2.output.summary}}`.

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

Click **Run** and check **Output** to confirm the generated result before using it elsewhere in the workflow.

## Notes

* This page lives under `utility` in the docs tree, but the actual step appears under **Generation** in the Fetch Hive step picker.
* Existing **PDF Generation** steps are now **Generate File** steps with the PDF format selected.
* Google Docs and Google Sheets remain separate integration steps when you want to create a document in a connected Google account instead of storing a file in the media library.

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