Analyze contract risk from Google Drive with OpenAI and log to Gmail & Sheets
Ready for 3.0What this workflow does
This AI workflow has 11 nodes and runs on Google Drive events (file created). Along the way it connects Google Drive, OpenAI, Gmail and Google Sheets.
How it runs
Trigger: On Google Drive events (file created).
- Download file (Google Drive): download
- Extract Text From Downloaded File (Code): runs custom JavaScript code
- AI Contract Analysis (OpenAI): uses OpenAI
- Format AI Output (Code): runs custom JavaScript code
- Alert Teams Automatically (If): checks a condition and branches into true / false
- Send a message (Gmail): uses Gmail
- Send a message (Gmail): uses Gmail
- Get The Data To Save In google Sheet (Code): runs custom JavaScript code
- Get The Data To Save In google Sheet (Code): runs custom JavaScript code
- Append row in sheet (Google Sheets): append
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 (7)
- Google Drive
n8n-nodes-base.googleDrive - Code
n8n-nodes-base.code - OpenAI
@n8n/n8n-nodes-langchain.openAi - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Sheets
n8n-nodes-base.googleSheets
From the author
How it works This workflow automates end-to-end contract analysis when a new file is uploaded to Google Drive. It downloads the contract, extracts its content, and uses AI to analyze legal terms, obligations, and risks. Based on the assessed risk level, it…