n8n-nodes-adeu 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # n8n-nodes-adeu
2
+
3
+ [![npm version](https://img.shields.io/npm/v/n8n-nodes-adeu.svg)](https://www.npmjs.com/package/n8n-nodes-adeu)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ An [n8n](https://n8n.io) community node for **[Adeu](https://adeu.ai)** — the Virtual DOM for Microsoft Word.
7
+
8
+ This node lets your n8n workflows apply AI-driven tracked changes, extract LLM-friendly Markdown, generate diffs, and sanitize `.docx` documents — all without leaving the n8n canvas.
9
+
10
+ It is a thin wrapper around the [`@adeu/core`](https://www.npmjs.com/package/@adeu/core) TypeScript engine, which executes entirely in-process. Your documents never leave the n8n runtime.
11
+
12
+ ## Installation
13
+
14
+ Follow n8n's [community nodes installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) and install `n8n-nodes-adeu`.
15
+
16
+ ## Operations
17
+
18
+ The node exposes one resource (**Document**) with four operations:
19
+
20
+ ### Extract Markdown
21
+ Project a `.docx` into LLM-friendly CriticMarkup (with a Semantic Appendix of defined terms, cross-references, and likely typos).
22
+ - **Input**: `.docx` binary
23
+ - **Output**: JSON `{ markdown, fileName, cleanView }`
24
+ - Use `Clean View = true` to simulate "Accept All Changes" before extraction.
25
+
26
+ ### Apply Edits
27
+ Apply a batch of `DocumentChange` operations as native Word tracked changes and comments.
28
+ - **Input**: `.docx` binary + a `changes` array (from upstream JSON or defined inline)
29
+ - **Output**: redlined `.docx` binary + JSON stats
30
+ - Supported change types: `modify`, `accept`, `reject`, `reply`, `insert_row`, `delete_row`
31
+
32
+ The typical pipeline is: **Read DOCX → LLM Node → Adeu (Apply Edits) → Send Email**, where the LLM outputs a JSON array of edits matching the `DocumentChange` schema from [`@adeu/core`](https://github.com/dealfluence/adeu/tree/main/node/packages/core).
33
+
34
+ ### Generate Diff
35
+ Produce a sub-word level `@@ Word Patch @@` diff between two `.docx` documents.
36
+ - **Input**: two `.docx` binaries on the same item (defaults: `data` and `data2`)
37
+ - **Output**: JSON `{ diff, originalFileName, modifiedFileName }`
38
+
39
+ ### Finalize Document
40
+ Strip metadata (author names, internal IDs, RSIDs, custom XML), optionally accept all tracked changes, and optionally lock the document read-only.
41
+ - **Input**: `.docx` binary
42
+ - **Output**: finalized `.docx` binary + a human-readable sanitization report
43
+
44
+ ## Example Workflow
45
+
46
+ ```
47
+ [ Read Binary File ]
48
+
49
+
50
+ [ AI Agent / OpenAI ] ← outputs { changes: [...] }
51
+
52
+
53
+ [ Adeu — Apply Edits ] ← reads changes from input JSON
54
+
55
+
56
+ [ Adeu — Finalize Document ]
57
+
58
+
59
+ [ Send Email (with attachment) ]
60
+ ```
61
+
62
+ ## Error Handling
63
+
64
+ When `@adeu/core` rejects an edit, this node surfaces a structured `NodeApiError` with both *what happened* and *how to fix it* — e.g.:
65
+ - "An edit could not be applied: target text not found." → verify exact punctuation/whitespace
66
+ - "An edit matched multiple locations in the document." → add surrounding context to `target_text`
67
+ - "The document could not be opened." → verify the binary is `.docx`, not `.doc`/`.pdf`
68
+
69
+ Enable n8n's **Continue On Fail** to keep batch workflows running through partial errors.
70
+
71
+ ## License
72
+
73
+ MIT — see [LICENSE](../../../LICENSE).