Calendar SOP Enforcement: 3 Calendars, Zero Manual Review
The Situation
A US investment fund runs on strict meeting SOPs. Mornings are protected for deep work, Mondays are internal-only, Tuesdays are external-only, Wednesday and Thursday absorb overflow with a hard cap, Fridays stay meeting-free. The team also splits time across three separate Google Calendars: Business, Fund, and Personal. Getting any of this wrong costs focus, costs deal time, and eventually costs trust with partners.
The Problem
Enforcement was manual. Someone had to scan three calendars daily, spot a meeting booked before noon, catch two back-to-back events with no buffer, flag an external booking on an internal day. Reviews were tedious, late, and easy to miss. An earlier attempt used n8n's built-in static data to avoid repeat alerts, but that state resets on every workflow save. In practice, the same violation re-fired to Slack every 5 minutes all day. Alert fatigue set in and the team started ignoring the channel, which defeated the point.
The Solution
I built a two-tier n8n system backed by Supabase. A real-time monitor polls all three Google Calendars every 5 minutes, runs each event through an SOP audit engine (time-of-day, buffer, day-type, daily caps), and posts violations to a dedicated Slack channel. A daily audit runs at 8:30 AM ET with a full-week sweep and AI-generated rescheduling suggestions, and on Fridays it sends a second message previewing the coming week.
The deduplication layer is the piece that made this work in production. Every violation gets a stable key (rule + date + event hash). Before any Slack send, the workflow pulls the week's reported alerts from a Supabase table and set-differences against them. Only genuinely new violations reach Slack. Each morning the daily audit deletes the prior week's rows, keeping the table lean.
The entire system runs inside n8n and Supabase. No custom server, no Docker, no local code. The whole toolchain is managed through MCP servers, so workflow updates, schema changes, and deploys happen through a controlled AI-orchestrated interface with a staging-to-production safety boundary.
Tech Stack: n8n, Supabase, PostgreSQL, Google Calendar API, Slack API, OpenAI API, MCP (Model Context Protocol)
The Results
- 3 Google Calendars monitored continuously with zero manual review
- 5-minute detection from violation to Slack alert
- Zero duplicate alerts after the Supabase dedup layer replaced the fragile in-memory hash
- Daily 8:30 AM audit with AI rescheduling suggestions, plus Friday next-week preview
- Serverless architecture: no app server, no Docker, managed entirely through n8n and Supabase
- Safe deploys: production workflow changes gated behind explicit operator confirmation
How It Works
1. Scheduler fires every 5 minutes and reads sync state from Supabase
2. Events pulled from Business, Fund, and Personal Google Calendars plus the approved exceptions whitelist
3. Change detection exits early if nothing moved since the last poll
4. SOP audit engine evaluates every event against time, buffer, day-type, and cap rules
5. Dedup layer compares new violation keys against the week's reported alerts in Supabase
6. Genuinely new violations post to Slack and get written back to Supabase
A US investment fund runs on strict meeting SOPs. Mornings are protected for deep work, Mondays are internal-only, Tuesdays are external-only, Wednesday and Thursday absorb overflow with a hard cap, Fridays stay meeting-free. The team also splits time across three separate Google Calendars: Business, Fund, and Personal. Getting any of this wrong costs focus, costs deal time, and eventually costs trust with partners.
The Problem
Enforcement was manual. Someone had to scan three calendars daily, spot a meeting booked before noon, catch two back-to-back events with no buffer, flag an external booking on an internal day. Reviews were tedious, late, and easy to miss. An earlier attempt used n8n's built-in static data to avoid repeat alerts, but that state resets on every workflow save. In practice, the same violation re-fired to Slack every 5 minutes all day. Alert fatigue set in and the team started ignoring the channel, which defeated the point.
The Solution
I built a two-tier n8n system backed by Supabase. A real-time monitor polls all three Google Calendars every 5 minutes, runs each event through an SOP audit engine (time-of-day, buffer, day-type, daily caps), and posts violations to a dedicated Slack channel. A daily audit runs at 8:30 AM ET with a full-week sweep and AI-generated rescheduling suggestions, and on Fridays it sends a second message previewing the coming week.
The deduplication layer is the piece that made this work in production. Every violation gets a stable key (rule + date + event hash). Before any Slack send, the workflow pulls the week's reported alerts from a Supabase table and set-differences against them. Only genuinely new violations reach Slack. Each morning the daily audit deletes the prior week's rows, keeping the table lean.
The entire system runs inside n8n and Supabase. No custom server, no Docker, no local code. The whole toolchain is managed through MCP servers, so workflow updates, schema changes, and deploys happen through a controlled AI-orchestrated interface with a staging-to-production safety boundary.
Tech Stack: n8n, Supabase, PostgreSQL, Google Calendar API, Slack API, OpenAI API, MCP (Model Context Protocol)
The Results
- 3 Google Calendars monitored continuously with zero manual review
- 5-minute detection from violation to Slack alert
- Zero duplicate alerts after the Supabase dedup layer replaced the fragile in-memory hash
- Daily 8:30 AM audit with AI rescheduling suggestions, plus Friday next-week preview
- Serverless architecture: no app server, no Docker, managed entirely through n8n and Supabase
- Safe deploys: production workflow changes gated behind explicit operator confirmation
How It Works
1. Scheduler fires every 5 minutes and reads sync state from Supabase
2. Events pulled from Business, Fund, and Personal Google Calendars plus the approved exceptions whitelist
3. Change detection exits early if nothing moved since the last poll
4. SOP audit engine evaluates every event against time, buffer, day-type, and cap rules
5. Dedup layer compares new violation keys against the week's reported alerts in Supabase
6. Genuinely new violations post to Slack and get written back to Supabase