View DOC Metadata
Read everything a document says about itself
- doc
- title
- description
- author
- copyright
- language
- keywords
- keywords_list
- created
- modified
- generator
- custom
- word_count
- character_count
- asset_count
- assets
- has_metadata
- summary
Documents are boxes of text that also carry a story about themselves - who wrote them, when, what licence, what to call them. View DOC Metadata is the node that opens the box and hands you every bit of that story on its own socket, and it shows the whole reading on the node as it goes. It's the first thing you reach for after a Load DOC or a Text to DOC when you want to know what you're actually holding.
What it does
Feed it any DOC (from any node with a DOC output - Text to DOC, Load DOC, a converted file) and out comes a column of sockets, one per metadata field: title, description, author, copyright, language, and keywords, plus a keywords_list (the same keywords as a list, for Text List Get and friends). Then come the timestamps - created and modified as UTC strings like 2026-01-02T03:04:05Z, which sort correctly as text - and generator, which is WAS Node Suite for anything this pack wrote.
The important thing about all of these: a field the document doesn't carry comes out empty, not invented. An older document with no language tag reports an empty language, and a document with no created stamp doesn't pretend it was written when you read it. No guessing, which keeps downstream logic honest.
Beyond the descriptive fields:
- custom - the author's own key-value pairs as a DICT, for Text Dictionary Get or Dictionary to Console. This is where anything the standard fields have no room for travels.
- word_count and character_count - counted from the content on this run, with markup stripped first, so bold text inside a word doesn't split it. That means they're always right even if the file's own stored count went stale. Zero for an empty document.
- asset_count and assets - how many files are embedded in the document (pictures, say) and their names, each relative to the document's own assets folder. Zero and empty when there are none.
- has_metadata - true when any of title, description, author, copyright, language or keywords holds something. Wire it into a switch and you can fill fields in before export rather than shipping a file that describes nothing.
- summary - the whole reading as one block of text, a field per line with
(not set)for empties. The same text is drawn on the node. Send it to Text to Console or a text file to keep a record of what a run produced.
How to use it
This is an output-style node (ComfyUI marks it as one), so its main job is inspection - but the sockets make it programmable too. The pattern that pays off is gating exports on has_metadata (fill in a title before you ship), feeding word_count into a condition that catches an accidentally-empty document, and using keywords_list to drive list nodes when a doc's tags need processing. And honestly, just wiring it after any DOC-producing node once is worth it: it's the fastest way to see what your Text to DOC really ended up carrying, and it reads from the wire, not from disk, so what it reports is what this document actually holds right now.
Installing it
Part of WAS Node Suite v3 (WASasquatch's was-node-suite-comfyui, MIT). Search "WAS Node Suite v3" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git
Restart ComfyUI after installing. Requires ComfyUI 0.14.0+ and Python 3.10+; no extra packages needed to read metadata. Only exporting to Office formats (via Save DOC) pulls in the optional document_export dependency group.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| doc | DOC | The document to read, from any node with a DOC output. Nothing is opened from disk here: what is reported is what the document on this wire carries, so a document loaded from a file reports what that file holds and one just built reports what has been set on it so far. |
Outputs (17)
| Name | Type | Description |
|---|---|---|
| title | STRING | What the document is called. Empty when it has none, which is how a document made from plain text starts out. This is the title an exported file carries and the one a file manager shows in its title column. |
| description | STRING | The sentence or two saying what the document is. Empty when nothing was written. Every document format a DOC can be exported to has this field, so it is worth filling in before a save. |
| author | STRING | Who wrote the document, as free text. Empty when the document names nobody. |
| copyright | STRING | The rights statement, such as '(c) 2026 A. Name, CC BY 4.0'. Free text rather than a licence code, because a document may carry either. Empty when the document makes no claim, which is worth checking before publishing what a workflow produced. |
| language | STRING | The language tag the document is written in, such as 'en' or 'pt-BR'. It decides hyphenation and spell checking in an exported file and the voice a screen reader picks. Empty when the document carries no tag, which is the case for every document written before the field was filled in. |
| keywords | STRING | The keywords joined with commas, which is how the document formats and desktop search engines spell the field. Empty when the document has none. Use the keywords_list output instead to reach one keyword at a time. |
| keywords_list | ARRAY | The same keywords as a list, in the order they were given, for Text List Get, Text List Length and Text List Slice. A document with no keywords gives an empty list, which those nodes report as a length of zero rather than failing. |
| created | STRING | When the document was first made, as UTC in the form '2026-01-02T03:04:05Z', which sorts correctly as text. Empty when the document carries no stamp: the time it was read is never reported as the time it was written. |
| modified | STRING | When the document's content last changed, in the same form as created. Editing a document's text or its embedded files stamps this; changing only its metadata does not, because this field reports on the content. Empty when the document carries no stamp. |
| generator | STRING | What produced the document, 'WAS Node Suite' for one this pack wrote. Empty for a container built by hand or by another tool that did not fill the field in. |
| custom | DICT | The author's own pairs of text, in the order the document holds them, for Text Dictionary Get, Text Dictionary Keys and Dictionary to Console. This is where anything the standard fields have no room for is carried, and all three export formats keep such pairs. An empty dictionary when the document has none. |
| word_count | INT | How many words the document's text holds, with the markup stripped first, so bold text inside a word does not split it. Counted from the content on this run rather than read from the document, so it is right even where the file's own figure is out of date. Zero for an empty document. |
| character_count | INT | How many characters that same text holds: spaces between words count, each line break counts as one, and the indentation between tags counts for nothing. Counted from the content on this run. Wire it into a condition node to catch a document that came out empty. |
| asset_count | INT | How many files are embedded in the document, such as the pictures in it. Zero for a document that carries none, and an entry naming a place outside the document is not counted, because it is refused when the document is read. |
| assets | ARRAY | The names of those files, sorted, each one relative to the document's own assets folder and spelled with '/' whatever machine the document was written on. An empty list when there are none. |
| has_metadata | BOOLEAN | True when the document says anything about itself: any of title, description, author, copyright, language or keywords holds something. The timestamps and the generator are not counted, because this pack writes all three on every document it saves. Wire it into a switch to fill the fields in before an export rather than shipping a file that describes nothing. |
| summary | STRING | The whole reading as one block of text, a field to a line, labelled with the name of the socket beside it, with '(not set)' where a field is empty. The same text is shown on the node. Send it to Text to Console or Save Text File to keep a record of what a run produced. |