Skip to main content

Compare Word Documents using n8n action

PDF4me Compare Word Documents enables comparing two Word documents and tracking changes with comprehensive comparison options through n8n automation workflows. This powerful document comparison feature supports detailed change tracking, customizable comparison settings, revision management, and professional comparison reports with full control over formatting, case sensitivity, comments, tables, fields, footnotes, textboxes, and headers/footers, perfect for document review, version control, and collaborative editing workflows.

Setup

Add the PDF4me "Compare Word Documents" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.

Prerequisites:

  • PDF4me API credentials
  • n8n workflow access

Configuration:

  1. Add PDF4me node to workflow
  2. Select "Compare Word Documents" action
  3. Configure input parameters (see below)
Compare Word Documents

Parameters

Complete list of parameters for the Compare Word Documents action. Configure these parameters to control document comparison behavior.

Important: Parameters marked with an asterisk (***) are required. Advanced parameters provide fine-grained control over comparison options.

ParameterTypeDescriptionExample
First Document Name***StringFirst Document Name
• Name of the first (base) document
• Must include proper file extension (.docx, .doc)
• This document serves as the base for comparison
original.docx
First Document Content***Base64First Document Content
• Base64-encoded content of the first document
• Must be valid Word document (.docx, .doc formats)
UEsDBBQABgAI...
Second Document Name***StringSecond Document Name
• Name of the second (comparison) document
• Must include proper file extension (.docx, .doc)
• This document is compared against the first
modified.docx
Second Document Content***Base64Second Document Content
• Base64-encoded content of the second document
• Must be valid Word document (.docx, .doc formats)
UEsDBBQABgAI...
Ignore FormattingBooleanIgnore Formatting Changes
• Yes - Ignore formatting changes (bold, italic, font, color, etc.)
• No - Track formatting changes (default)
No
Ignore Case ChangesBooleanIgnore Case Changes
• Yes - Ignore case changes ("Hello" vs "HELLO")
• No - Track case changes (default)
No
Ignore CommentsBooleanIgnore Comments
• Yes - Ignore comment changes and additions
• No - Track comment changes (default)
No
Ignore TablesBooleanIgnore Table Changes
• Yes - Ignore table structure and content changes
• No - Track table changes (default)
No
Ignore FieldsBooleanIgnore Field Changes
• Yes - Ignore field updates (dates, formulas, cross-references)
• No - Track field changes (default)
No
Ignore FootnotesBooleanIgnore Footnote Changes
• Yes - Ignore footnote content and formatting changes
• No - Track footnote changes (default)
No
Ignore TextboxesBooleanIgnore Textbox Changes
• Yes - Ignore textbox content and positioning changes
• No - Track textbox changes (default)
No
Ignore Headers And FootersBooleanIgnore Header/Footer Changes
• Yes - Ignore header and footer content changes
• No - Track header/footer changes (default)
No
AuthorStringComparison Author
• Author name for tracked changes
• Default: "Comparison"
• Used to attribute changes in the result document
John Doe

Output

Output Parameters

ParameterTypeDescriptionExample
fileNameStringComparison result document filename - The name of the output Word document with comparison results and tracked changescompared_documents.docx
fileSizeNumberFile size in bytes - The size of the comparison result document in bytes13633
successBooleanPDF4me operation status - Boolean flag indicating the success or failure of the document comparison operation. PDF4me returns true for successful operations and false for any errorstrue
firstDocumentStringFirst document name - The name of the first (base) document that was comparedoriginal.docx
secondDocumentStringSecond document name - The name of the second (comparison) document that was comparedrevised.docx
comparisonOptionsObjectComparison options used - Object containing all the comparison settings that were applied during the comparison{"ignoreFormatting": false, "ignoreCase": false, ...}
comparisonOptions.ignoreFormattingBooleanIgnore formatting changes - Whether formatting changes were ignored during comparisonfalse
comparisonOptions.ignoreCaseBooleanIgnore case changes - Whether case changes were ignored during comparisonfalse
comparisonOptions.ignoreCommentsBooleanIgnore comments - Whether comment changes were ignored during comparisonfalse
comparisonOptions.ignoreTablesBooleanIgnore table changes - Whether table changes were ignored during comparisonfalse
comparisonOptions.ignoreFieldsBooleanIgnore field changes - Whether field changes were ignored during comparisonfalse
comparisonOptions.ignoreFootnotesBooleanIgnore footnote changes - Whether footnote changes were ignored during comparisonfalse
comparisonOptions.ignoreTextboxesBooleanIgnore textbox changes - Whether textbox changes were ignored during comparisonfalse
comparisonOptions.ignoreHeadersAndFootersBooleanIgnore header/footer changes - Whether header and footer changes were ignored during comparisonfalse
comparisonOptions.authorStringComparison author - The author name used for tracked changes in the result documentSystem Comparison
messageStringOperation message - Descriptive message indicating the result of the comparison operationWord documents compared successfully

N8N Action Response

The PDF4me Compare Word Documents API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:

JSON Response Format

The raw JSON response from the API:

[
{
"fileName": "compared_documents.docx",
"fileSize": 13633,
"success": true,
"firstDocument": "original.docx",
"secondDocument": "revised.docx",
"comparisonOptions": {
"ignoreFormatting": false,
"ignoreCase": false,
"ignoreComments": false,
"ignoreTables": false,
"ignoreFields": false,
"ignoreFootnotes": false,
"ignoreTextboxes": false,
"ignoreHeadersAndFooters": false,
"author": "System Comparison"
},
"message": "Word documents compared successfully"
}
]

Use Cases

Enterprise Document Automation

  • Document Review: Compare document versions to identify changes
  • Version Control: Track changes between document versions
  • Collaborative Editing: Review changes made by multiple authors
  • Quality Assurance: Verify document modifications and updates

AI-Powered Document Processing

  • Multi-Format Support: Process Word documents in .docx and .doc formats
  • Multi-Language Processing: Support for different languages and regions
  • Intelligent Comparison: Automatic change detection and tracking

Business Intelligence and Analytics

  • Document Management: Track document changes and revisions
  • Compliance Monitoring: Ensure documents meet version control requirements
  • Performance Metrics: Track processing accuracy and efficiency

Get Help