Templates / Intelligent legal document review and compliance automation

Intelligent legal document review and compliance automation

Ready for 3.0

by Cheng Siong Chin ✓ · 5,058 views · created 2025-12-16 · Document Extraction, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 17 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model and Postgres.

How it runs

Trigger: When an HTTP POST request hits its webhook URL.

  1. Workflow Configuration (Edit Fields (Set)): sets 3 fields: complianceRules, riskThreshold, documentType
  2. Extract Document Text (Extract from File): extracts data from a file (pdf)
  3. Clause Analysis Agent (AI Agent): runs an AI agent, with model: OpenAI Model - Clause Analysis; output parser: Clause Analysis Output Parser
  4. Compliance Check Agent (AI Agent): runs an AI agent, with model: OpenAI Model - Compliance; output parser: Compliance Output Parser
  5. Alternative Wording Agent (AI Agent): runs an AI agent, with model: OpenAI Model - Alternative Wording; output parser: Alternative Wording Output Parser
  6. Summary Report Generator (AI Agent): runs an AI agent, with model: OpenAI Model - Summary
  7. Prepare Database Record (Edit Fields (Set)): sets 7 fields: document_name, review_date, risk_summary…
  8. Log to Contract Database (Postgres): uses Postgres
  9. Send Notification (HTTP Request): calls an HTTP API (POST)

Services it uses

OpenAI Chat ModelPostgres

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

How It Works This template automates legal document review by extracting text, analyzing clauses with OpenAI, checking compliance standards, and generating alternative wordings. Target audience: legal teams, contract managers, and compliance officers seeking…

Excerpt from Cheng Siong Chin's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.