Templates / Analyze contract risk from Google Drive with OpenAI and log to Gmail & Sheets

Analyze contract risk from Google Drive with OpenAI and log to Gmail & Sheets

Ready for 3.0

by Avkash Kakdiya ✓ · 225 views · created 2026-01-08 · Document Extraction, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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).

  1. Download file (Google Drive): download
  2. Extract Text From Downloaded File (Code): runs custom JavaScript code
  3. AI Contract Analysis (OpenAI): uses OpenAI
  4. Format AI Output (Code): runs custom JavaScript code
  5. Alert Teams Automatically (If): checks a condition and branches into true / false
  6. Send a message (Gmail): uses Gmail
  7. Send a message (Gmail): uses Gmail
  8. Get The Data To Save In google Sheet (Code): runs custom JavaScript code
  9. Get The Data To Save In google Sheet (Code): runs custom JavaScript code
  10. Append row in sheet (Google Sheets): append

Services it uses

Google DriveOpenAIGmailGoogle Sheets

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)

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…

Excerpt from Avkash Kakdiya's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.