DOCX to Text

Converts DOCX file to plain text

Overview

This node converts a DOCX file (Microsoft Word document) into plain text. It is useful in workflows where you need to extract readable content from DOCX files for further processing, such as text analysis, search indexing, or integration with other systems that require plain text input.

Practical examples:

  • Automatically extracting the text from resumes submitted as DOCX files and storing them in a database.
  • Converting DOCX reports to plain text for use in downstream analytics or natural language processing nodes.
  • Preparing DOCX meeting notes for email distribution or archiving as plain text.

Properties

Name Type Meaning
Input Binary Field String The name of the input binary field containing the DOCX file to be converted.
Destination Output Field String The name of the output field where the extracted plain text will be stored in the result.

Output

The node outputs an array of items, each with a json object containing a single property:

{
  "<Destination Output Field>": "<Extracted plain text from DOCX>"
}
  • The key is the value provided in "Destination Output Field".
  • The value is the plain text extracted from the DOCX file.

Example:

If "Destination Output Field" is set to text, the output will look like:

{
  "text": "This is the extracted text from the DOCX file."
}

Dependencies

  • External library: mammoth (used for DOCX to text conversion)
  • No external API keys or special n8n environment variables are required.

Troubleshooting

  • No binary data found for field "..."
    This error occurs if the specified "Input Binary Field" does not exist or does not contain any data.
    Resolution: Ensure that the incoming item has a binary property with the exact name specified in "Input Binary Field".

  • Corrupted or invalid DOCX file
    If the binary data is not a valid DOCX file, the conversion may fail silently or produce empty/garbled text.
    Resolution: Verify that the uploaded file is a valid DOCX document.

  • Empty output
    If the DOCX file contains only images or unsupported content, the extracted text may be empty.
    Resolution: Check the source DOCX file for actual text content.

Links and References

Discussion