Skip to content
 
 

Repository files navigation

n8n-nodes-docx-converter

This is an n8n community node that converts DOCX files to plain text using Mammoth.js.

n8n is a fair-code licensed workflow automation platform.

Installation

Community Nodes (Recommended)

  1. Go to Settings > Community Nodes in your n8n instance
  2. Click Install a community node
  3. Enter n8n-nodes-docx-converter
  4. Click Install

Manual Installation

cd ~/.n8n/nodes
npm install n8n-nodes-docx-converter
# Restart n8n

Usage

  1. Add a node that provides binary data (e.g., Read Binary File, HTTP Request, Google Drive)
  2. Connect it to the DOCX to Text node
  3. Configure the node:
    • Input Binary Field: The field containing the DOCX file (default: data)
    • Output Field Name: Where to store the extracted text (default: text)

The extracted text will be available in the output JSON under the field name you specified.

Operations

  • Convert DOCX file binary data to plain text

Credentials

No credentials required.

Compatibility

  • Requires n8n version 1.0.0 or higher
  • Requires Node.js 22+

Development

Prerequisites

  • Node.js 22+
  • pnpm 9.1+
  • Docker (for local testing with n8n)

Setup

git clone https://github.com/cre8tiv/n8n-docx-converter.git
cd n8n-docx-converter
pnpm install

Commands

pnpm build          # Build the node
pnpm test           # Run tests
pnpm lint           # Lint code
pnpm pack           # Build and create .tgz package
pnpm dev            # Start n8n with this node in dev mode

Testing with Docker n8n

The quickest way to test changes is using the reload scripts:

Windows:

reload.bat [container_name]

Linux/Mac:

./reload.sh [container_name]

These scripts will:

  1. Run tests
  2. Build the node
  3. Create a .tgz package
  4. Copy and install it in your n8n Docker container
  5. Restart n8n

Default container name is n8n. Pass a different name if needed:

./reload.sh my-n8n-container

Manual Docker Installation

# Build the package
pnpm pack

# Copy to container and install
docker cp n8n-nodes-docx-converter-*.tgz n8n:/tmp/
docker exec -u root n8n npm install -g /tmp/n8n-nodes-docx-converter-*.tgz
docker restart n8n

Resources

Version History

0.2.0

  • Update to latest n8n SDK (@n8n/node-cli)
  • Add unit tests with Vitest
  • Improve error handling with continueOnFail support
  • Add data lineage tracking (pairedItem)

0.1.3

  • Use binary field input instead of file paths

0.1.0

  • Initial release

License

MIT

About

n8n node to convert .docx to text for ingestion

Resources

Stars

18 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages