Text to DOC
Build a real document on the wire, metadata and all
- custom_metadata
- DOC
Most ComfyUI pipelines end in pixels. Some end in paperwork - shot lists, prompt batches, project notes you need to hand to someone who doesn't live in a node graph. Text to DOC is where the WAS Node Suite's document system starts: it takes a string and wraps it into a DOC object with real document metadata, ready to be inspected, saved, or exported to actual file formats.
What it does
Wire in your text and out comes one DOC - the pack's native document type, carried on a single wire. Nothing is written to disk here; this node just builds the in-memory document that every other document node reads. The text_format choice sets how the text is interpreted:
- plain text (default) - prose. A blank line starts a new paragraph, and any HTML tags in the text show as written, like a code sample.
- html - the text is the document's markup. Keep your headings, lists, tables, links and images, exactly as written.
Either way, runs of spaces and indentation collapse, so pasting from somewhere messy doesn't create formatting garbage. An empty text still gives you a valid document - just one carrying its metadata and no content.
The whole point of a "document" rather than a plain string is the metadata fields, and they're all optional inputs:
- title - what the document is called; shown by viewers, file managers and exported files (left empty, whatever opens it falls back to the file name).
- description - the sentence for future-you who finds this in six months.
- author - "A. Name", not an account name. It travels inside the document, so copies stay attributed.
- copyright - the rights statement, like
(c) 2026 A. Name, CC BY 4.0. Free text, so a full sentence is fine. Worth filling before a document leaves your machine - this is the part that travels with it. - language - a tag like
en,en-GB,jaorpt-BR, which decides hyphenation and spell-checking on export. - keywords - comma-separated search terms. It's the one metadata field desktop search reads, so it's what makes a document findable months later.
- custom_metadata - your own key-value pairs, fed from a DICT output like Text Dictionary New, for anything the standard fields don't cover.
The DOC that comes out carries the word and character counts computed from your text, so downstream nodes can check it without re-parsing.
What it pairs with
The intended flow is Text to DOC → View DOC Metadata (see what the document actually ended up carrying) → Save DOC (write it out). Save DOC is where the export formats live - .docx, .odt, .pdf, plus the pack's own .wasdoc. Note the dependency split: building a DOC needs nothing installed, but exporting to Office formats needs the pack's document_export feature group. If you only ever keep documents on the wire or in .wasdoc, you can skip it.
Installing it
Part of WAS Node Suite v3 (WASasquatch's was-node-suite-comfyui, MIT). Install the pack:
# ComfyUI Manager: search "WAS Node Suite v3", install, restart.
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git
Requires ComfyUI 0.14.0+ and Python 3.10+. If you want Save DOC to write .docx, .odt or .pdf, install the optional group (portable Windows: run from the ComfyUI_windows_portable dir):
python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\was-node-suite-comfyui\requirements\document_export.txt
Then set document_export: true under features: in the pack's config.yaml (at <ComfyUI user dir>/was-node-suite/config.yaml) and restart.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | What the document says. On text_format 'plain text' a blank line starts a new paragraph; on 'html' it is used as the document's markup exactly as written. | |
| text_format | COMBO | plain text | How the text is read. 'plain text' is for prose and shows any tag as written; 'html' is for markup, keeping headings, lists, tables, links and images. |
| titleopt | STRING | What the document is called, such as 'Shot list, scene 4'. It is carried inside the document and is the title a document viewer, a file manager column and an exported file all show. Left empty, the document carries no title and whatever opens it falls back to the file name. | |
| descriptionopt | STRING | A sentence or two saying what the document is, for the reader who finds it in six months. It is the field a document properties panel and a search result show under the title. Left empty, the document describes itself only by its title. | |
| authoropt | STRING | Who wrote the document, as a name rather than an account: 'A. Name' or 'Studio Name'. It travels inside the document, so a copy passed on still says who made it. Left empty, the document names nobody. | |
| copyrightopt | STRING | The rights statement to carry with the document, such as '(c) 2026 A. Name, CC BY 4.0'. Free text rather than a licence code, so a full sentence and a licence name are both fine. Worth filling in before a document leaves the machine, because this is the part that travels with it. | |
| languageopt | STRING | The language the text is written in, as a tag: 'en', 'en-GB', 'ja', 'pt-BR'. Empty by default, so the document claims no language. | |
| keywordsopt | STRING | Search terms for the document, separated by commas, such as 'concept art, dragon, shot 12'. Spaces around a comma are trimmed and an empty entry is dropped. This is the one metadata field a desktop search engine reads, so it is what makes a document findable again months later. | |
| custom_metadataopt | DICT | Further pairs of your own to carry in the document, from Text Dictionary New or any other node with a DICT output. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DOC | DOC | The whole document on one wire: its markup, the metadata filled in here, and the word and character counts taken from the text. Nothing has been written to disk, so this wire is what every document node reads, starting with View DOC Metadata for a look at what the document ended up carrying. |