Templates / Analyze contract risk from Google Drive PDFs with OpenAI, Claude, Gemini, Sheets and Gmail

Analyze contract risk from Google Drive PDFs with OpenAI, Claude, Gemini, Sheets and Gmail

Ready for 3.0

by Javed Iqbal ✓ · 0 views · created 2026-10-05 · 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 17 nodes and runs on Google Drive events (file created). Along the way it connects Google Drive, OpenAI Chat Model, Anthropic Chat Model and Google Gemini Chat Model and 2 more.

How it runs

Trigger: On Google Drive events (file created).

  1. Filter: keeps only the items that match a condition
  2. Set Processing Parameters (Edit Fields (Set)): sets 6 fields: aiProvider, googleSheetId, sheetTabName…
  3. Download PDF from Drive (Google Drive): download
  4. Extract PDF Text (Extract from File): extracts data from a file (pdf)
  5. Prepare Text for Analysis (Code): runs custom JavaScript code
  6. Route by AI Provider (Switch): routes items into branches
  7. OpenAI Contract Analysis (Information Extractor): extracts structured fields from text with AI, with model: OpenAI GPT-4 Model
  8. Claude Contract Analysis (Information Extractor): extracts structured fields from text with AI, with model: Claude Sonnet Model
  9. Gemini Contract Analysis (Information Extractor): extracts structured fields from text with AI, with model: Gemini Chat Model
  10. Normalize AI Analysis (Code): runs custom JavaScript code

…plus 3 more steps. See the full node list below.

Services it uses

Google DriveOpenAI Chat ModelAnthropic Chat ModelGoogle Gemini Chat ModelGoogle SheetsGmail

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)

From the author

Quick overview This workflow watches a Google Drive folder for new PDF contracts, extracts their text, analyzes them with OpenAI, Anthropic Claude, or Google Gemini to produce a structured risk assessment, logs the results to Google Sheets, and sends a Gmail…

Excerpt from Javed Iqbal'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.