Analyze legal contract risk with Google Gemini hybrid RAG and Supabase
Ready for 3.0What this workflow does
This AI workflow has 26 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Gemini, Google Gemini Chat Model and Supabase. It also calls generativelanguage.googleapis.com and kwfhbdrqlfnzlixvbpsl.supabase.co over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Merge: merges the data from its input branches
- get job id (Edit Fields (Set)): sets 1 field: job_id
- Clause Splitter (Code): runs custom JavaScript code
- Extract from File: extracts data from a file (pdf)
- Classify Clause Type (Google Gemini): uses Google Gemini
- extract JSON from Gemini response (Code): runs custom JavaScript code
- Prepare Embedding Request (Code): runs custom JavaScript code
- Generate Embedding (HTTP Request): calls generativelanguage.googleapis.com (POST)
- Extract Embedding (Code): runs custom JavaScript code
- Wait: pauses before continuing
…plus 14 more steps. See the full node list below.
Services it uses
HTTP calls to: generativelanguage.googleapis.com, kwfhbdrqlfnzlixvbpsl.supabase.co
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 (11)
- Extract from File
n8n-nodes-base.extractFromFile - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Wait
n8n-nodes-base.wait - Merge
n8n-nodes-base.merge - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Webhook
n8n-nodes-base.webhook - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Supabase
n8n-nodes-base.supabase
From the author
🚀 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 into clauses, analyses each one using Hybrid RAG (semantic +…