Analyze contract risk from PDFs with OpenAI, Supabase and Slack alerts
Ready for 3.0What this workflow does
This workflow has 23 nodes and runs when someone submits an n8n form (“Contract AI Analysis — Upload & Analyze”) (plus 2 other triggers). Along the way it connects Supabase, Slack and Gmail. It also calls api.openai.com over HTTP.
How it runs
Trigger: When someone submits an n8n form (“Contract AI Analysis — Upload & Analyze”) (plus 2 other triggers).
- Config (Edit Fields (Set)): sets 7 fields: RISK_THRESHOLD, SLACK_CHANNEL, ADMIN_SLACK_CHANNEL…
- Slack: create
- Check Duplicate (HTTP Request): calls an HTTP API
- Already Exists? (If): checks a condition and branches into true / false
- Already Analyzed (n8n Form): shows the next form page
- Has File? (If): checks a condition and branches into true / false
- Extract PDF Text (Extract from File): extracts data from a file (pdf)
- Sample Data (Edit Fields (Set)): sets 7 fields: contractText, filename, Contract Type…
- Prepare Text (Code): runs custom JavaScript code
- AI Pass 1 - Classify (HTTP Request): calls api.openai.com (POST)
…plus 10 more steps. See the full node list below.
Services it uses
HTTP calls to: api.openai.com
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 (12)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - n8n Form
n8n-nodes-base.form - Extract from File
n8n-nodes-base.extractFromFile - Code
n8n-nodes-base.code - Supabase
n8n-nodes-base.supabase - Error Trigger
n8n-nodes-base.errorTrigger - Slack
n8n-nodes-base.slack - Gmail
n8n-nodes-base.gmail
From the author
Who it's for Legal, Procurement, and Compliance teams at mid-size companies. ESN and agencies selling AI-powered contract review as a service. How it works Upload a contract PDF through a rich form (with metadata: contract type, counterparty, department,…