Library / Documents, PDF & OCR
Documents, PDF & OCR
Detect contract compliance violations with Notion, Google Sheets and Groq
On a schedule, it reads and extracts data from documents with Groq and OpenAI / ChatGPT using Groq, Google Sheets, Notion.
What it does
# Contract Compliance Violation Detection This workflow acts as an automated Compliance Engine for the procurement process. It continuously monitors daily purchasing transactions from Google Sheets, matches them against active contract terms in Notion, and calculates exact financial leakage. By leveraging AI to analyze historical vendor trends, it shifts procurement from reactive error-catching to proactive systemic contract enforcement. ## Setup Steps * Daily Cron Trigger — Run the workflow automatically on a daily schedule at 6:00 AM. * Fetch Active Contracts — Retrieve currently active contract terms and pricing baselines from Notion. * Fetch Recent Transactions — Pull the latest procurement transactions and invoices from a Google Sheet. * Compare Terms vs Actuals — Execute the core logic to identify overcharges, calculate exact transaction leakage, and flag SLA or volume breaches. * Violation Router — Route the workflow into compliant and non-compliant branches based on the analysis. * Log Compliant Transactions — Archive clean transactions to a Google Sheet tab to maintain a secure audit trail. * Fetch Violation History — Query the historical Google Sheets log to identify repeat vendor infractions. * Analyze Trends & Leakage — Calculate cumulative historical leakage and format trend data for the AI engine. * Batch Current Violations — Loop over the detected violations to process them individually through the AI model. * AI Analysis Chain — Use a Groq-powered LLM with a structured output parser to evaluate the violation alongside historical trends, generating corrective actions. * Slack Alert Procurement — Send an immediate, context-rich notification to the designated Slack channel detailing the leakage and AI recommendation. * Log Violation Details — Append the specific violation metrics, trend data, and AI strategy back into the main audit sheet.
The steps
- Daily Cron Trigger
- Fetch Active Contracts
- Fetch Recent Transactions
- Compare Terms vs Actuals
- Violation Detected Router
- Log Compliant Transactions
- Fetch Violation History
- Analyze Trends & Leakage
- Batch Current Violations
- AI Analysis Chain
- Groq Inference Engine
- Enforce JSON Schema
- Extract AI Recommendations
- Log Violation Details
Similar automations
Documents, PDF & OCRTrack contract renewals from Drive with LlamaParse, OpenAI and Slack alerts35 stepsDocuments, PDF & OCRNotify Legal from Contract Documents and Send to SAP4 stepsDocuments, PDF & OCRAnalyze invoice exceptions weekly and publish RCA reports with Groq and Notion16 stepsCalendar & SchedulingTrack Japanese business-day contract deadlines with Claude, Sheets and Slack18 steps