Write DOCX From Markdown
Controlled node
Overview
The Write DOCX From Markdown node converts markdown content into a Microsoft Word .docx file and saves it to the project library. It is useful for generating editable reports, summaries, exports, or handoff documents from markdown produced in a workflow.
This node is similar to Write PDF From Markdown, but it keeps the generated document in DOCX format instead of converting it to PDF.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the DOCX generation and upload. | - |
| Data | Data | The markdown content to convert. Non-string data is converted to text before rendering. | - |
| Name | Data | The filename for the generated DOCX file. If the name does not end with .docx, the extension is appended automatically. | - |
| Path | Data | Optional folder path in the library where the DOCX should be saved. Missing folders are created automatically. If omitted, the file is saved in the root library folder. | root |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the node has finished running. |
| File | Data | The generated library file reference. If conversion or upload fails, this output contains an error object. |
Runtime Behavior and Defaults
- Controlled Node: The node runs only when the Run event fires.
- Project Requirement: A runtime project ID is required so the generated DOCX can be uploaded to the project library.
- Filename Handling: The node requires a non-empty Name input.
.docxis appended if the extension is missing. - Directory Creation: If Path is provided, the node creates or resolves that library folder path before uploading.
- Markdown Conversion: Data is converted to a string, then rendered into a DOCX buffer.
- Empty Output Check: If conversion produces an empty buffer, File contains an error object.
- Error Handling: If data, project ID, filename, conversion, or upload fails, File contains an error object instead of a file reference.
Example Usage
Generate an Editable Report
- Use AI Write or Markdown Text to produce markdown content.
- Connect the markdown output to Data.
- Set Name to
"client-report". - Optionally set Path to
"reports/docx". - Trigger Run from a Start node or another event.
The node saves client-report.docx to the library and outputs the generated file reference.
tip
Use Read DOCX to read the generated document back into markdown, or Get Library Download URLs if you need a downloadable link.