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:
- Add PDF4me node to workflow
- Select "Compare Word Documents" action
- Configure input parameters (see below)

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.
| Parameter | Type | Description | Example |
|---|---|---|---|
| First Document Name*** | String | First 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*** | Base64 | First Document Content • Base64-encoded content of the first document • Must be valid Word document (.docx, .doc formats) | UEsDBBQABgAI... |
| Second Document Name*** | String | Second 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*** | Base64 | Second Document Content • Base64-encoded content of the second document • Must be valid Word document (.docx, .doc formats) | UEsDBBQABgAI... |
| Ignore Formatting | Boolean | Ignore Formatting Changes • Yes - Ignore formatting changes (bold, italic, font, color, etc.) • No - Track formatting changes (default) | No |
| Ignore Case Changes | Boolean | Ignore Case Changes • Yes - Ignore case changes ("Hello" vs "HELLO") • No - Track case changes (default) | No |
| Ignore Comments | Boolean | Ignore Comments • Yes - Ignore comment changes and additions • No - Track comment changes (default) | No |
| Ignore Tables | Boolean | Ignore Table Changes • Yes - Ignore table structure and content changes • No - Track table changes (default) | No |
| Ignore Fields | Boolean | Ignore Field Changes • Yes - Ignore field updates (dates, formulas, cross-references) • No - Track field changes (default) | No |
| Ignore Footnotes | Boolean | Ignore Footnote Changes • Yes - Ignore footnote content and formatting changes • No - Track footnote changes (default) | No |
| Ignore Textboxes | Boolean | Ignore Textbox Changes • Yes - Ignore textbox content and positioning changes • No - Track textbox changes (default) | No |
| Ignore Headers And Footers | Boolean | Ignore Header/Footer Changes • Yes - Ignore header and footer content changes • No - Track header/footer changes (default) | No |
| Author | String | Comparison Author • Author name for tracked changes • Default: "Comparison" • Used to attribute changes in the result document | John Doe |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| fileName | String | Comparison result document filename - The name of the output Word document with comparison results and tracked changes | compared_documents.docx |
| fileSize | Number | File size in bytes - The size of the comparison result document in bytes | 13633 |
| success | Boolean | PDF4me operation status - Boolean flag indicating the success or failure of the document comparison operation. PDF4me returns true for successful operations and false for any errors | true |
| firstDocument | String | First document name - The name of the first (base) document that was compared | original.docx |
| secondDocument | String | Second document name - The name of the second (comparison) document that was compared | revised.docx |
| comparisonOptions | Object | Comparison options used - Object containing all the comparison settings that were applied during the comparison | {"ignoreFormatting": false, "ignoreCase": false, ...} |
| comparisonOptions.ignoreFormatting | Boolean | Ignore formatting changes - Whether formatting changes were ignored during comparison | false |
| comparisonOptions.ignoreCase | Boolean | Ignore case changes - Whether case changes were ignored during comparison | false |
| comparisonOptions.ignoreComments | Boolean | Ignore comments - Whether comment changes were ignored during comparison | false |
| comparisonOptions.ignoreTables | Boolean | Ignore table changes - Whether table changes were ignored during comparison | false |
| comparisonOptions.ignoreFields | Boolean | Ignore field changes - Whether field changes were ignored during comparison | false |
| comparisonOptions.ignoreFootnotes | Boolean | Ignore footnote changes - Whether footnote changes were ignored during comparison | false |
| comparisonOptions.ignoreTextboxes | Boolean | Ignore textbox changes - Whether textbox changes were ignored during comparison | false |
| comparisonOptions.ignoreHeadersAndFooters | Boolean | Ignore header/footer changes - Whether header and footer changes were ignored during comparison | false |
| comparisonOptions.author | String | Comparison author - The author name used for tracked changes in the result document | System Comparison |
| message | String | Operation message - Descriptive message indicating the result of the comparison operation | Word 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
- Table
- Schema
- Binary
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"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| 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 |
Comparison Options Details:
| Option | Value |
|---|---|
| ignoreFormatting | false |
| ignoreCase | false |
| ignoreComments | false |
| ignoreTables | false |
| ignoreFields | false |
| ignoreFootnotes | false |
| ignoreTextboxes | false |
| ignoreHeadersAndFooters | false |
| author | System Comparison |
Schema View
The data structure and types of the response:
1 item
fileName: T compared_documents.docx
fileSize: # 13633
success: ☑ true
firstDocument: T original.docx
secondDocument: T revised.docx
comparisonOptions: {}
ignoreFormatting: ☑ false
ignoreCase: ☑ false
ignoreComments: ☑ false
ignoreTables: ☑ false
ignoreFields: ☑ false
ignoreFootnotes: ☑ false
ignoreTextboxes: ☑ false
ignoreHeadersAndFooters: ☑ false
author: T System Comparison
message: T Word documents compared successfully
Type Indicators:
T= String (Text)#= Number☑= Boolean[]= Array{}= Object
Binary Data View
The actual Word document file data and metadata:
data
─────────────────────────────
File Name: compared_documents.docx
File Extension: docx
Mime Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
File Size: 13.6 kB
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
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