Block 1 - Extract from File
- Type / Role
- n8n-nodes-base.extractFromFile - extractFromFile
- Config choices
- Version 1.1
What This Workflow Does This workflow transforms any PDF legal contract into a detailed AI powered risk report — in under 5 minutes. Upload a contract, and the system automatically splits it int...
n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.googlegemini, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.wait, n8n-nodes-base.merge, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.agent
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Divyanshu Gupta.
Original n8n.io sourceThis workflow transforms any PDF legal contract into a detailed AI-powered risk report — in under 5 minutes. Upload a contract, and the system automatically splits it into clauses, analyses each one using Hybrid RAG (semantic + keyword search), scores risk as HIGH / MEDIUM / LOW, and delivers plain-English explanations with safer alternative wording.
Most dangerous clauses don't use obvious legal keywords. "The Client accepts full responsibility for all third-party claims" is an indemnification clause — but keyword search misses it. Hybrid RAG combines:
Pipeline 1 — Ingestion: Builds the knowledge base of risky clause patterns in Supabase Pipeline 2 — Query: Analyses new contracts against the knowledge base
Both pipelines run in the same workflow — the branch splits at Extract Embedding.
legal_clauses (knowledge base) + reports (results)match_clauses() + keyword_search_clauses()reports table, keyed by job_idThis catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
Showing the first 24 of 37 workflow blocks. Download the JSON for the full node graph.
| Workflow | Analyze legal contract risk with Google Gemini hybrid RAG and Supabase |
|---|---|
| Complexity | advanced |
| Nodes | 37 |
| Categories | Document Extraction, AI RAG |
| Author | Divyanshu Gupta |
| Published | 26 Apr 2026 |
Use the JSON export at /data/workflows/15307/15307.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
What This Workflow Does This workflow transforms any PDF legal contract into a detailed AI powered risk report — in under 5 minutes. Upload a contract, and the system automatically splits it int...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI RAG use case.