Adeu
Operate on Microsoft Word (.docx) files: extract LLM-friendly Markdown with CriticMarkup, navigate large documents via a structural outline, apply tracked changes and comments, generate sub-word diffs or one-step redline comparisons, and sanitize/finalize documents. Seven operations on the Document resource: (1) Extract Markdown — project a .docx into Markdown plus a Semantic Appendix (or a Fields Content Controls ledger in mode='fields'); toggle Clean View to simulate Accept All; pass an optional Page number or 'N-M' page range to fetch a slice of a large document. (2) Extract Outline — return a token-cheap structural map (headings with level, page number, end_page, paragraph style, has_table, footnote IDs) plus total_pages. Pair with Extract Markdown to navigate large documents. (3) Apply Edits — apply a JSON array of DocumentChange objects sequentially as native Word tracked changes (or manual strikethrough/underline formatting when Markup Mode is 'manual'); modify edits support match_mode ('strict'|'first'|'all'), regex (boolean), Markdown headings/bold/italic/'\n\n' splits/pipe tables, `{#cell:<id>}` empty-cell anchors, and single or multi-author comments; set_field fills content controls by CC:<N>, tag, or alias. (4) Apply Text Revision — hand back the COMPLETE revised clean text of the document and let the engine diff it against the clean view and write the tracked changes; it refuses CriticMarkup and partial-page text, and fails without returning a document when the applied result's clean text does not match the text supplied. (5) Generate Diff — produce a @@ Word Patch @@ sub-word diff, unified diff, structured DocumentChange JSON array, or a one-step redlined .docx comparison (`diffFormat='redlineDocx'`) between two .docx files. (6) Finalize Document — strip metadata, optionally accept all pending markup, and optionally lock the file read-only. (7) Hydrate Tool Output — re-attach a redlined .docx that Apply Edits, Apply Text Revision, or Generate Diff (`redlineDocx`) stashed while running as an AI Agent tool; place it on the main line downstream of the Agent, because n8n's tool wrapper strips binaries from tool output. DocumentChange schema (used by Apply Edits): each object has a 'type' field discriminator, and changes in a batch evaluate SEQUENTIALLY against the state produced by prior changes. type='modify' requires target_text (string — plain text resolves across hyperlinks, cross-references, and bookmarks; empty table cells emit `{#cell:<id>}`) and new_text (string — supports '#'–'######' headings, '**bold**', '_italic_', '\n\n' paragraph splits, and Markdown pipe tables `| H1 | H2 |\n|---|---|\n| A | B |`; omit new_text with a comment to annotate without changing text; empty string deletes); optional comment (string or `[{text, author?}]`); optional match_mode ('strict'|'first'|'all', default 'strict'); optional regex (boolean, default false — when true, target_text is an ES2022 RegExp pattern with optional inline flags like `(?i)`, and new_text may reference $1, $2 capture groups). type='set_field' requires field (string like 'CC:3', tag, or alias from Extract Markdown mode='fields') and value (string — checkboxes take true/false, dates YYYY-MM-DD, dropdowns a listed option); optional match_mode and comment. type='accept' or type='reject' requires target_id (string like 'Chg:12' from the Markdown projection); optional part (e.g. 'word/header1.xml' when the same id exists in several parts); optional comment. type='reply' requires target_id (string like 'Com:45') and text (string). type='insert_row' requires target_text (string), position ('above' or 'below'), and cells (array of strings). type='delete_row' requires target_text (string). Never wrap new_text in CriticMarkup tags like {++ ++} or {-- --}; the engine applies tracking automatically. Never target text already wrapped in another author's pending tracked change; accept or reject their change first by target_id. Binary handling for AI Agents: this tool cannot receive .docx files through JSON arguments because JSON cannot carry binary data. To process a document, set 'Document Source' to 'From Another Node' and 'Source Node Name' to the exact name of the workflow node that produced the .docx binary (typically the trigger node, e.g. 'Gmail Trigger', 'When clicking Test workflow', or an HTTP Request node configured to download a file). Node names are case-sensitive and must match the canvas label exactly. For the Generate Diff operation, set both 'Original Source Node Name' and 'Modified Source Node Name' independently.
Actions7
Document → Apply Text Revision
AI-generatedSummary
Apply a complete revised version of a document’s clean text as tracked changes in a .docx file, then verify that the resulting clean text matches the supplied revision. The operation returns the redlined document as binary output and fails if the revision cannot be applied or verified.
Inputs
- Document Source — Choose the current input item’s binary or a named upstream node’s binary as the .docx source. For a named node, provide its exact canvas name; the source must have executed and produced binary output.
- Source Node Name — Required when Document Source is From Another Node. Exact, case-sensitive name of the upstream node holding the document.
- Source Binary ID — Optional binary storage ID when reading from another node; when supplied, the document is loaded directly from that ID instead of the source node.
- Input Binary Property (required) — Binary property containing the valid .docx file; defaults to data.
- Output Binary Property (required) — Binary property for the redlined .docx output; defaults to data. If it matches the input property, the outgoing item’s original binary is overwritten.
- Author — Name attached to each tracked change; defaults to Adeu AI.
- Reasoning — Optional rationale captured for auditability. It is not passed to the redline engine.
- Revised Text (required) — The complete revised clean text for the whole document, not a page or partial extract. The operation diffs it against the document’s clean view and applies the differences as tracked changes. Do not include CriticMarkup tags. Major deletions are refused by default: more than 50% of characters, or 75% for documents under 2,000 characters; enable Allow Major Deletions to permit them.
- Allow Major Deletions — Whether to allow revisions exceeding the major-deletion thresholds; defaults to false.
Output shape
A single outgoing item with the redlined .docx in the configured output binary property.
The operation re-reads the clean text after applying the revision and fails without returning a result if it differs from Revised Text. Some document structures, such as headings, table rows, and footnotes, cannot be removed through text replacement.