# Save to MOI Volume

Save workflow documents, rows, text, or JSON to an MOI volume or directory.

Use it to retain results for download, later import, or another workflow.

## Configure destination and content

The destination `target_ref` is required. Select a Catalog volume or directory and bind one main content input.

| Content | Binding |
| --- | --- |
| Documents | `documents`, retaining structure and metadata |
| Rows | `rows`, with `columns` for CSV headers |
| Plain text | `text`, such as an AI-generated summary |
| JSON | `json`, for structured objects or arrays |
| Existing files | `file_ids`, handled as file references |

The saved format depends on the input. Documents with associated parsing artifacts may be packaged as ZIP files.

## Use the output

`file_id` identifies the primary result file; `file_ids` covers all result files. `volume_id` and `result_ref` locate the saved results.

`count` counts saved records or files depending on input type. Use `file_ids` when processing all output files.

## Example: save query results as CSV

Flow: SQL Processing → Save to MOI Volume.

Bind `rows`, provide matching `columns`, and choose a target volume. The first CSV row contains headers; configure later file imports to skip it.

## Related pages

- [Variables and data flow](../../variables-and-data.md)
- [Run and debug](../../run-debug.md)
