---
title: Save as File
description: Save text content as a downloadable file
---

Save text your workflow produced, such as a CSV table, a Markdown report or JSON, as a file in your downloads.

## What it does

Save as File takes the text in **Content** and downloads it as a file named **File name** plus the extension of **File type**. The browser's usual download behaviour applies: the file lands in your downloads folder, or you are asked where to save it, depending on your browser settings.

If **File name** already ends with the right extension (`report.csv` with type *csv*), the extension is not added twice. The file type also sets the file's format label, so a *csv* file opens in a spreadsheet app and an *html* file opens in the browser.

The node needs AWFlow 0.7.0 or later. Workflows that use it do not install on older versions.

## When to use it

* Keep the result of a run on your computer: a scraped table as CSV, a summary as Markdown, raw data as JSON.
* Export data you built with [CSV](/nodes/builtin/datatransformation/csv/), [JSON](/nodes/builtin/datatransformation/json/), [Markdown](/nodes/builtin/datatransformation/markdown/) or [Code](/nodes/builtin/core/code/).
* To download a file from a link (an image, a PDF), use [Download as file](/nodes/builtin/datatransformation/downloadasfile/) instead. To keep the file inside the workflow for another node, use [Convert to File](/nodes/builtin/datatransformation/converttofile/).

## Inputs and settings

Fill **Content** with an expression that points at the text, for example `{{ $input.csv }}` after a CSV node. **File name** can use expressions too, such as `report-{{ $run.name }}`.

## Outputs

The output is an empty item. Its only job is to start the download; the next node, if any, simply runs after it.

## Dependencies and credentials

None. This node needs no connection and has no slots for other nodes.

## Example workflow

1. [HTML Extract](/nodes/builtin/datatransformation/html-extract/) reads the rows of a table on the current page.
2. [CSV](/nodes/builtin/datatransformation/csv/) with **Operation** *Build from items* turns them into CSV text in the `csv` field.
3. Save as File with **Content** `{{ $input.csv }}`, **File name** `prices` and **File type** *csv*. You get `prices.csv` in your downloads.

## Common issues

* **"Save as File must run where a browser is available."** The node ran in a place that has no page to start a download from. Run the workflow from the AWFlow app or the extension's side panel.
* **The node fails before saving, saying it expected text.** **Content** points at a list or an object. Turn the data into text first with [JSON](/nodes/builtin/datatransformation/json/) or [CSV](/nodes/builtin/datatransformation/csv/), and point **Content** at that result.
* **The file is called `file.txt`.** **File name** and **File type** were left empty, so the defaults were used. Set both.

## Related nodes

* [Download as file](/nodes/builtin/datatransformation/downloadasfile/): save a file from a link.
* [CSV](/nodes/builtin/datatransformation/csv/): turn items into CSV text.
* [Convert to File](/nodes/builtin/datatransformation/converttofile/): make a file other nodes can use.