When managing a large library of legal forms, keeping stakeholders informed about updates can be tedious. Each revision requires someone to manually review tracked changes and write a summary explaining what changed. For organizations like AAGLA (Apartment Association of Greater Los Angeles) that maintain hundreds of standardized forms, this becomes a significant time sink.
We built an automated solution using n8n workflow automation and OpenAI to solve this problem.
The Challenge
Legal form libraries require regular updates—terminology standardization, field cleanup, signature block formatting, and occasional substantive changes. Each update needs a professional summary for landlords and property managers explaining what changed and why.
Manually writing these summaries meant:
- Opening each Word document
- Reviewing tracked changes (insertions and deletions)
- Writing a consistent, professional summary
- Logging everything to a spreadsheet
Multiply this by dozens of documents per revision cycle, and it adds up quickly.
The Solution
We created an n8n workflow that:
- Monitors a Google Drive folder for new .docx files with tracked changes
- Extracts the tracked changes directly from the Word document’s XML structure
- Sends the changes to OpenAI with specific instructions about the summary format
- Appends the summary to a Google Sheet with the date, document title, and generated summary
The workflow runs automatically when new files are added, or can be triggered manually to process an entire folder at once.
Technical Highlights
Extracting tracked changes from Word documents was the interesting challenge. Word’s .docx format is actually a ZIP archive containing XML files. The tracked changes live in word/document.xml as <w:ins> (insertions) and <w:del> (deletions) tags.
We used n8n’s Execute Command node with the system unzip utility to extract this XML, then parsed it with a Code node to pull out the actual text changes.
The AI prompt was tuned to produce consistent, professional summaries that:
- Start with the document name and revision date
- Focus on formatting and terminology changes (Owner→Landlord, Renter→Tenant)
- Call out any non-standard changes with “Additionally, …”
- Avoid generic concluding sentences
The Result
What used to take 10-15 minutes per document now happens automatically in seconds. A batch of 13 documents processes in about a minute, with summaries appearing in the Google Sheet ready for review.
The summaries are consistent in tone and format, making them easy to publish directly or with minimal editing.
Tools Used
- n8n (self-hosted) – Workflow automation
- Google Drive – File storage and trigger
- Google Sheets – Output logging
- OpenAI API (gpt-4o-mini) – Summary generation
This workflow demonstrates how combining document parsing with AI can eliminate repetitive writing tasks while maintaining quality and consistency.