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

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

  1. Daily Cron Trigger
  2. Fetch Active Contracts
  3. Fetch Recent Transactions
  4. Compare Terms vs Actuals
  5. Violation Detected Router
  6. Log Compliant Transactions
  7. Fetch Violation History
  8. Analyze Trends & Leakage
  9. Batch Current Violations
  10. AI Analysis Chain
  11. Groq Inference Engine
  12. Enforce JSON Schema
  13. Extract AI Recommendations
  14. Log Violation Details

Similar automations