Review contract clauses against your playbook with Google Drive and Claude
Ready for 3.0What this workflow does
This AI workflow has 24 nodes and runs on Google Drive events (file created) (plus 1 other trigger). Along the way it connects Google Drive, Anthropic Chat Model and Google Sheets. It also calls api.anthropic.com over HTTP.
How it runs
Trigger: On Google Drive events (file created) (plus 1 other trigger).
- Retrieve Contract from Drive (Google Drive): download
- Configure Review Settings (Edit Fields (Set)): sets 9 fields: ourSide, playbook, hardLimits…
- Encode File to Base (Code): runs custom JavaScript code
- Prepare Extraction Request (Code): runs custom JavaScript code
- Post Extraction to Anthropic API (HTTP Request): calls api.anthropic.com (POST)
- Process Extracted Clauses (Code): runs custom JavaScript code
- Batch Process Clauses (Loop Over Items (Split in Batches)): loops over the items in batches
- Collate Clause Findings (Code): runs custom JavaScript code
- Evaluate Clauses with Agent (AI Agent): runs an AI agent, with model: Claude AI Model for Review; output parser: Structure Assessment Results
- Determine Escalation Necessity (If): checks a condition and branches into true / false
…plus 10 more steps. See the full node list below.
Services it uses
HTTP calls to: api.anthropic.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 (13)
- Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Drive
n8n-nodes-base.googleDrive - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - AI Agent
@n8n/n8n-nodes-langchain.agent - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - Wait
n8n-nodes-base.wait - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow watches a Google Drive folder for new contracts, uses Anthropic Claude to extract and assess clauses against your legal playbook and hard limits, then aggregates a verdict, optionally pauses for a human decision, logs the results…