Route legal contract risks with GPT-4o, Slack, Google Sheets and a regulatory API
Ready for 3.0What this workflow does
This AI workflow has 25 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model, HTTP Request and Slack.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Extract Contract Text (Extract from File): extracts data from a file (text)
- Legal Governance Agent (AI Agent): runs an AI agent, with model: Governance Model; 3 tools (Slack Alert Tool, Contract Review Agent, Compliance Validation Agent); memory: Contract Review Memory; output parser: Structured Output Parser
- Route by Risk Level (Switch): routes items into 3 branches
- Prepare Critical Alert (Edit Fields (Set)): sets 4 fields: alertType, priority, requiresImmediateAction…
- Prepare High Risk Alert (Edit Fields (Set)): sets 4 fields: alertType, priority, requiresImmediateAction…
- Prepare Standard Review (Edit Fields (Set)): sets 4 fields: alertType, priority, requiresImmediateAction…
- Prepare Audit Record (Edit Fields (Set)): sets 9 fields: contractId, riskLevel, complianceStatus…
- Track Contract Reviews (Data table): uses Data table
- Split Risk Clauses (Split Out): splits a list into separate items
- Check Approval Required (If): checks a condition and branches into true / false
…plus 5 more steps. See the full node list below.
Services it uses
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 (14)
- Webhook
n8n-nodes-base.webhook - Extract from File
n8n-nodes-base.extractFromFile - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - AI Agent Tool
@n8n/n8n-nodes-langchain.agentTool - Http Request Tool
n8n-nodes-base.httpRequestTool - Slack Tool
n8n-nodes-base.slackTool - Switch
n8n-nodes-base.switch - Edit Fields (Set)
n8n-nodes-base.set - Data table
n8n-nodes-base.dataTable - Split Out
n8n-nodes-base.splitOut - If
n8n-nodes-base.if
From the author
How It Works This workflow automates end-to-end legal contract review and compliance governance for legal teams, contract managers, and risk officers. It solves the problem of manually reviewing uploaded contracts for regulatory compliance, risk…