๐ฌ Validate compliance records with OpenAI, Google Sheets, Telegram, and Slack
โก 98 views ยท ๐ฌ Document Extraction & Analysis
Description
Quick overview
This workflow runs daily to audit rows in a Google Sheets ComplianceRecords tab using two OpenAI checks, automatically marking compliant items, fixing safe issues, and escalating unresolved violations to Telegram, while logging every outcome to an AuditLog sheet and posting errors to Slack.
How it works
- Runs every 24 hours on a schedule trigger.
- Reads all records from the Google Sheets
ComplianceRecordsworksheet. - Sends each record to OpenAI (GPT-4o-mini) for a first-pass compliance screen and parses the JSON result.
- Marks records with no violations as Compliant and routes flagged records to a second OpenAI (GPT-4o-mini) review to classify them as false positives, auto-fixable issues, or true violations.
- Updates Google Sheets with the corrected value for auto-fixable records, sends a Telegram message to the compliance team for records requiring human review, and labels false positives as resolved.
- Merges all outcomes and appends a timestamped entry to the Google Sheets
AuditLogworksheet, while sending Slack alerts if the AI steps or overall workflow error.
Setup
- Add OpenAI credentials for both OpenAI nodes and ensure the selected model (gpt-4o-mini) is available in your account.
- Add Google Sheets OAuth2 credentials, create a spreadsheet with
ComplianceRecordsandAuditLogtabs, and replaceYOUR_GOOGLE_SHEET_IDin all Google Sheets nodes. - Add Telegram Bot credentials and replace
YOUR_COMPLIANCE_TEAM_CHAT_IDwith the destination chat ID for escalations. - Add Slack OAuth2 credentials and replace
YOUR_SLACK_CHANNEL_IDin all Slack alert nodes. - Confirm
ComplianceRecordsincludes the expected columns (for exampleRecordID, RecordType, DataField, Value, Description, Department, Status) and adjust the schedule interval if you want a different audit frequency.
๐ Nodes Used
Google Sheets, Slack, Telegram, Schedule Trigger, OpenAI
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File