Read DOCX
Controlled node
Overview
The Read DOCX node extracts text content from Microsoft Word documents (.docx files) and converts them into markdown format. This allows you to process Word documents within your workflow, extracting their content for further text processing, analysis, or transformation by other nodes.
The node validates that the input file is a valid DOCX document by checking its MIME type (application/vnd.openxmlformats-officedocument.wordprocessingml.document) before attempting to parse it.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Fires when the node starts reading the document | - |
| File | FileSource | The DOCX file to read from the library. Accepts files with MIME type application/vnd.openxmlformats-officedocument.wordprocessingml.document. | - |
Outputs
| Output | Type | Description |
|---|---|---|
| Output | Text | The extracted content from the DOCX file converted to markdown format. Returns an error object if parsing fails or if the input is invalid. |
| Done | Event | Fires when the node has finished processing the document |
Runtime Behavior and Defaults
- File Validation: The node strictly validates that the input file has the correct MIME type for DOCX documents. If the file is not a valid DOCX, the output will contain an error message.
- Array Handling: If the
fileinput receives an array of files, the node will process only the first file in the array. - Error Handling: The node returns error objects in the
outputif:- No project ID is found in the runtime context
- The file input is invalid or missing
- The file is not a valid DOCX document (wrong MIME type)
- The DOCX parsing fails for any reason
- Output Format: The extracted text is returned as markdown, preserving document structure where possible.
Example Usage
Connect a library file node or file source to the file input to provide a DOCX document. Trigger the run event to start processing. Once the done event fires, the output will contain the markdown text of the document, which can be connected to text processing nodes, AI Write nodes for summarization, or other document analysis tools.
[Library File] --(file)--> [Read DOCX] --(output)--> [AI Write]
| ^
| |
+-----------(done)---------------+
In this example, a DOCX file from the library is read and converted to markdown, then passed to an AI Write node for content analysis or summarization.