# AI Contract Redline: Compare Signed Documents Against Originals

> Automatically redline any signed contract or agreement against its original and produce an exhaustive change report before counter-signing. Upload the returned signed document (PDF, DOCX, or scanned image), name the original stored in Google Drive (DOCX or native Google Doc), and the workflow OCRs the signed copy, locates and downloads the original from Drive, converts both to clean text, and surfaces every difference categorized by type: substantive wording and clause changes with section numbers and side-by-side quotes, filled-in fields such as parties, effective dates, dollar amounts, addresses, and signer names and titles, signature block label differences, DocuSign and other e-signature artifacts, OCR rendering artifacts to ignore, and shared typos worth fixing in the original. Built for legal contract review, NDA comparison, MSA and SOW intake, vendor agreement onboarding, employment offer letter audits, partnership and referral agreement review, sales contract redlining, real estate purchase agreement comparison, insurance policy diff, lease and rental agreement review, and any returned-document intake workflow where you need to know exactly what changed before filing or counter-signing. Eliminates manual side-by-side reading, accelerates legal and operations review cycles, and prevents accidental acceptance of unfavorable revisions hidden inside a returned signed document.

Content type: workflow
Source URL: https://www.agentpmt.com/agent-workflow-skills/ai-contract-redline-compare-signed-documents-against-originals--69ec0559fafea730edcbc179
Markdown URL: https://www.agentpmt.com/api/agent/workflows/ai-contract-redline-compare-signed-documents-against-originals--69ec0559fafea730edcbc179?format=agent-md
Updated: 2026-04-25T00:38:15.882Z
Author: firef1ie

---

Estimated time saved: 45 minutes.

## Tools

- Document OCR Agent
- Google Drive
- MarkItDown Hosted Markdown Generator

## Workflow Outline

1. Collect Inputs: Goal: Confirm the two documents the user wants to compare: the signed/returned document and the original. | Inputs: User chat message and any uploaded files. The signed document may be referenced by File Management file...
2. OCR Signed Document: Pass the signed_file_id from the previous step as file_ids: [signed_file_id]. Extract plain text only - we do not need entities or per-page metadata for the diff. Preserve the ful...
3. Find Original in Drive: Pass the original_query from gather-inputs as the query parameter. If multiple results match, prefer the most recently modified file owned by the user. If zero results, surface th...
4. Download Original: Use the chosen file's id from find-original as file_id. For native Google Docs add export_format: "txt". For DOCX/PDF/other binary files omit export_format - the download produces...
5. Extract Original Text: Pass the signed_url from download-original as the url parameter. MarkItDown returns the original as Markdown text we can diff against the OCR output. Preserve the full markdown in...
6. Compare and Diff: Goal: Produce an exhaustive, accurate list of every difference between the OCR'd signed document text and the original markdown. | Inputs: 1) Plain text from ocr-signed-doc (the signed document). 2) Markdown from extrac...
7. Deliver Report: Goal: Return the diff report to the user as the final assistant message, formatted for quick legal review. | Inputs: The categorized diff from compare-documents. | Outputs: A single Markdown response that opens with a o...