Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Documents, PDF & OCR

Documents, PDF & OCR

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

When something happens in a connected app, it reads and extracts data from documents with Claude and OpenAI / ChatGPT using Gmail, Google Drive, Google Sheets.

What it does

## Analyze contracts from Google Drive with AI, log to Google Sheets and alert via Gmail ### How it works This workflow watches a Google Drive contracts folder for new PDF files, filters out non-PDFs, downloads each contract, and extracts its text. It prepares the contract content, routes it to the configured AI provider for structured analysis, normalizes the result, logs the findings to Google Sheets, and sends a Gmail alert when the contract is classified as high risk. ### Setup steps - Connect Google Drive credentials and configure the trigger to watch the correct contracts folder. - Connect Google Sheets credentials and set the target spreadsheet ID and sheet tab name in the Configuration node. - Connect Gmail credentials and set the recipient address in the Configuration node's alertEmail field. - Configure the desired aiProvider value and add credentials for the selected AI service: OpenAI, Anthropic Claude, or Google Gemini. - Review the PDF text extraction and AI analysis prompts/schema to ensure they match the contract fields and risk criteria you need. ### Customization You can change the aiProvider setting to switch between OpenAI, Claude, and Gemini, adjust the extraction schema or risk scoring logic, and modify the Google Sheets columns or Gmail alert content.

The steps

  1. When Contract Added to Drive
  2. Filter PDF Contracts
  3. Set Processing Parameters
  4. Download PDF from Drive
  5. Extract PDF Text
  6. Prepare Text for Analysis
  7. Route by AI Provider
  8. Normalize AI Analysis
  9. OpenAI Contract Analysis
  10. OpenAI GPT-4 Model
  11. Claude Contract Analysis
  12. Claude Sonnet Model
  13. Gemini Contract Analysis
  14. Gemini Chat Model

17 steps in total.

Similar automations