docx-generator

n8n node for generating DOCX files from JavaScript code

Package Information

Released: 10 mo ago
Downloads: 14 weekly / 26 monthly
Latest Version: 1.0.1

Documentation

n8n-nodes-docx-generator

This is an n8n community node that allows you to generate DOCX (Microsoft Word) files from JavaScript code.

Features

  • Generate complex DOCX documents with full formatting control
  • Support for tables, lists, headers, footers, and more
  • Secure sandboxed execution with timeout protection
  • Access to previous node data in your workflows
  • File size limit protection (250MB max)
  • No external API calls - fully offline operation

Installation

Via n8n Community Nodes

  1. Go to Settings → Community Nodes
  2. Click Install
  3. Enter n8n-nodes-docx-generator
  4. Click Install

Manual Installation

npm install n8n-nodes-docx-generator

Usage

The node accepts JavaScript code that uses the docx library to create documents.

Example

const doc = new Document({
  sections: [{
    children: [
      new Paragraph({
        children: [
          new TextRun({
            text: "Hello World",
            bold: true,
            size: 28
          })
        ]
      })
    ]
  }]
});
return doc;

Available Classes

All docx library classes are automatically available:

  • Document, Paragraph, TextRun
  • Table, TableRow, TableCell
  • Header, Footer
  • AlignmentType, UnderlineType, BorderStyle
  • And many more...

See the docx documentation for complete reference.

Security

This node includes several security features:

  • Sandboxed code execution
  • 60-second timeout protection
  • Blocked access to file system and network
  • Filename sanitization
  • 250MB file size limit
  • No external dependencies at runtime

License

MIT

Resources

Discussion