Skip to main content

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

InputTypeDescriptionDefault
RunEventTriggers the DOCX generation and upload.-
DataDataThe markdown content to convert. Non-string data is converted to text before rendering.-
NameDataThe filename for the generated DOCX file. If the name does not end with .docx, the extension is appended automatically.-
PathDataOptional 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

OutputTypeDescription
DoneEventFires when the node has finished running.
FileDataThe 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. .docx is 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

  1. Use AI Write or Markdown Text to produce markdown content.
  2. Connect the markdown output to Data.
  3. Set Name to "client-report".
  4. Optionally set Path to "reports/docx".
  5. 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.