> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-partner-nodes-consolidate.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SaveText - ComfyUI Built-in Node Documentation

> The Save Text node writes text content to a file in the output directory.

The Save Text node writes text content to a file in the output directory. It supports saving in .txt, .csv, .md, or .json format, and automatically handles JSON pretty-printing when valid JSON is provided.

## Inputs

| Parameter         | Description                                                                                                                                                                    | Data Type | Required | Range                                          |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- | -------- | ---------------------------------------------- |
| `text`            | The text content to save to a file. This input must be connected from another node.                                                                                            | STRING    | Yes      | -                                              |
| `filename_prefix` | Prefix for the output filename. A 5-digit counter is appended to prevent overwriting existing files (default: "ComfyUI").                                                      | STRING    | No       | -                                              |
| `format`          | The file format to save the text as (default: "txt"). When "json" is selected, valid JSON text is pretty-printed with 2-space indentation; otherwise, the text is saved as-is. | COMBO     | No       | `"txt"`<br />`"csv"`<br />`"md"`<br />`"json"` |

## Outputs

| Output Name | Description                                          | Data Type |
| ----------- | ---------------------------------------------------- | --------- |
| `text`      | The original text content that was saved to the file | STRING    |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/SaveText/en.md)

***

**Source fingerprint (SHA-256):** `09bd896cab770358132834892c1b37efd2ffa0cb0aa7b02b7ef91163331dc9b1`
