n8n-nodes-docx-generator
v1.0.1
Published
n8n node for generating DOCX files from JavaScript code
Maintainers
Readme
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
- Go to Settings → Community Nodes
- Click Install
- Enter
n8n-nodes-docx-generator - Click Install
Manual Installation
npm install n8n-nodes-docx-generatorUsage
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
