Skip to main content

Extract Text From Word in n8n

Extract Text From Word is an n8n node by PDF4me that pulls clean text content out of a .docx file, with options to strip comments, headers, footers, and finalize tracked changes before extraction. Use it for content migration, text mining, or feeding document text into downstream analysis without manual copy-paste.

What this node does

PDF4me: Extract Text From Word reads a .docx file and returns its text content, optionally limited to a page range and cleaned of comments, headers/footers, or unresolved tracked changes. Accepts input via Binary Data, Base64 String, or URL. Ideal for content migration, editorial cleanup, search indexing, and feeding document text into text-mining or analysis pipelines.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog

Authenticating Your API Request

Every PDF4me node in n8n requires a valid Credential to connect with. Create or select one that holds your PDF4me API key so the workflow can authenticate extraction requests securely.

Important Facts You Should Not Miss

Only 2 fields are truly required
The Word document input (via Input Data Type) and Document Name. Page range and the three cleanup toggles all have working defaults, matching the same pattern as the already-verified Make version of this action.
Accept Changes runs before extraction, not after
Setting Accept Changes finalizes every tracked change in the document first, so the extracted text reflects the edited version. Leave it off if you need text that logically corresponds to the pre-edit source.
Output is a binary file, not a plain string
The extracted text is returned as a binary file under Output Binary Field Name, typically JSON. Pass it into a downstream node to read, parse, or store the actual text content.
Extract Text From Word n8n node configured with Action Extract Text From Word, Input Data Type Binary Data, Input Binary Field data, Document Name document.docx, Start Page Number 1, End Page Number 3, and Extraction Options toggles Remove Comments, Remove Header/Footer, and Accept Changes all enabled

PDF4me Extract Text From Word node parameters panel in n8n

What Parameters Does Extract Text From Word Need?

Required: Input Data Type and Document Name, plus the field matching your chosen input type (Input Binary Field, Base64 Word Content, or Word URL). Start Page Number, End Page Number, Output Binary Field Name, and the three Extraction Options toggles are all optional.

ParameterRequiredWhat it doesExample
Input Data TypeRequiredFormat of the source Word document. Choose Binary Data (from a previous node), Base64 String, or URL.Binary Data
Input Binary FieldConditionalName of the binary property on the incoming n8n item that holds the Word file. Required when Input Data Type is Binary Data.data
Base64 Word ContentConditionalBase64-encoded Word content. Required when Input Data Type is Base64 String.UEsDBBQAAAAIAA...
Word URLConditionalPublicly reachable HTTPS URL to the source Word file. Required when Input Data Type is URL.https://example.com/document.docx
Document NameRequiredFilename of the input Word file, including the .docx extension, used for format detection.document.docx
Start Page NumberOptionalFirst page to include in extraction. Leave unset to start from page 1.1
End Page NumberOptionalLast page to include in extraction. Leave unset to extract through the last page.3
Remove CommentsOptionalStrips reviewer comments from the extracted text when enabled.true
Remove Header/FooterOptionalExcludes running headers and footers when enabled, leaving only body content.true
Accept ChangesOptionalFinalizes all tracked changes before extraction when enabled, so text reflects the edited version.true
Output Binary Field NameOptionalName of the binary property the output item exposes. Default is data.data

Advanced Options

Custom Profiles (Optional)
A JSON-like block of predefined parameters for specialized extraction configurations, such as { "outputDataFormat": "json" }, layered on top of the individual fields above.

Output Fields

FieldTypeWhat it contains
successBooleanTrue when extraction succeeded. Use to route error-handling branches.
fileNameStringGenerated filename for the extracted content file, typically ending in .json.
mimeTypeStringMIME type of the output, typically application/json or text/plain.
fileSizeNumberSize of the extracted content file in bytes.
docNameStringOriginal filename of the input Word document, kept for audit and tracking.
messageStringHuman-readable status message for the extraction result.
Binary (data)BinaryThe extracted text content under Output Binary Field Name (default data). Pass into a downstream node to read or store the text.

How Do I Set Up Extract Text From Word in n8n?

  1. Add PDF4me to your n8n workflow and choose the Extract Text From Word action.
  2. In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
  3. Set Input Data Type to Binary Data (default), Base64 String, or URL and supply the matching source field.
  4. Set Document Name with the .docx extension.
  5. Optionally set Start Page Number and End Page Number to limit extraction to a page range.
  6. Set Remove Comments, Remove Header/Footer, and Accept Changes as needed for a clean or edited-version extraction.
  7. Execute the node and route the extracted text into your content pipeline, search index, or analysis workflow.

Typical Setups

Workflow ExamplesCommon n8n workflow patterns using Extract Text From Word.
Content migration into a CMS
  1. A Google Drive trigger fires when a legacy Word document is added to a migration folder.
  2. PDF4me Extract Text From Word runs with Remove Header/Footer and Remove Comments enabled for a clean body-only extraction.
  3. The extracted text is posted to a headless CMS as a new content entry.
Editorial cleanup after review
  1. A reviewed manuscript with tracked changes and comments is uploaded via a form.
  2. PDF4me Extract Text From Word runs with Accept Changes and Remove Comments enabled for a clean final version.
  3. The finalized text is sent to a copy-editing or publishing pipeline.
Search index build from a document library
  1. A Loop Over Items node iterates Word documents from a SharePoint document library.
  2. PDF4me Extract Text From Word runs on each file with default extraction options.
  3. The extracted text is indexed into a search engine such as Elasticsearch or Algolia.
Section-level extraction for large reports
  1. A workflow needs only the executive summary from a long report.
  2. PDF4me Extract Text From Word runs with Start Page Number 1 and End Page Number 2 to limit extraction to the summary pages.
  3. The extracted summary text is sent into a text-summarization or analysis step.

Practical Tips

Only Input and Document Name are required
Page range and the three cleanup toggles all have working defaults; set them only when your workflow needs the behavior to differ.
Use page range for large documents
Set Start Page Number and End Page Number to extract only the section you need instead of processing an entire long document.
Accept Changes changes the output text
With Accept Changes on, deleted text in tracked changes will not appear in the extraction; with it off, the pre-edit text may still be present.
Output is binary, read it downstream
The extracted text arrives as a binary file, not a plain n8n string field; use a node that reads binary content to access the actual text.
Document Name still matters with Binary Data
The extension drives format detection regardless of input type; keep it accurate even when the file itself comes from a previous node.
Remove Header/Footer helps content analysis
Running headers and footers (page numbers, document titles) can pollute text-mining results; strip them for cleaner analysis.

Cheat Sheet

FieldValue
ActionExtract Text From Word
Input Data TypeBinary Data
Input Binary Fielddata
Document Namedocument.docx
Start Page Number1 (optional)
End Page Number(optional, defaults to last page)
Remove Commentstrue
Remove Header/Footertrue
Accept Changestrue
CredentialsPDF4me API credential

Common Questions

Which fields are required for Extract Text From Word?+
Two: the Word document input (via Input Data Type) and Document Name. Start Page Number, End Page Number, Remove Comments, Remove Header/Footer, and Accept Changes are all optional; the node applies sensible defaults.
What do Remove Comments, Remove Header/Footer, and Accept Changes do?+
Remove Comments strips reviewer comments from the extracted text. Remove Header/Footer excludes running headers and footers so only body content comes through. Accept Changes finalizes tracked changes before extraction, so the text reflects the edited version rather than the original with revision marks.
Can I extract text from only part of the document?+
Yes. Set Start Page Number and End Page Number to limit extraction to a specific page range, leave them unset to extract the entire document.
What format is the extracted text returned in?+
A binary file (typically JSON) exposed under Output Binary Field Name, alongside metadata fields like fileName, fileSize, and success. Pass the binary into a downstream node to read or store the text, similar to how the general-purpose Python approach in this Word text-extraction guide returns structured content rather than a raw string.
Does Accept Changes run before or after extraction?+
Before. Setting Accept Changes finalizes every tracked change in the document first, so the extracted text reflects the edited version, the same distinction raised in Microsoft Q&A discussions on extracting text from Word documents about edited versus original content.

Same Task on Other Platforms

Get Help