Handle GDPR access and erasure emails with Gmail, GPT-4o, Supabase and Airtable
Needs changesWhat this workflow does
This AI workflow has 18 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model, Supabase and Airtable and 1 more.
How it runs
Trigger: On Gmail events.
- Classify DSR Request (AI Agent): runs an AI agent, with model: OpenAI — Classify; output parser: DSR Classification Schema
- Query Supabase (Supabase): get many
- Consolidate DB Results (Code): runs custom JavaScript code
- Query Airtable CRM (Airtable): search
- Consolidate CRM Results (Code): runs custom JavaScript code
- Compile Data Report (AI Agent): runs an AI agent, with model: OpenAI — Compile; output parser: Report Schema
- Access or Erasure? (If): checks a condition and branches into true / false
- Send Access Report (Gmail): uses Gmail
- Delete from Supabase (Supabase): delete
- Merge: merges the data from its input branches
…plus 3 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Classify DSR Request (v1.8), Compile Data Report (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Classify DSR Request (v1.8), Compile Data Report (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (11)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Supabase
n8n-nodes-base.supabase - Code
n8n-nodes-base.code - Airtable
n8n-nodes-base.airtable - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail - Merge
n8n-nodes-base.merge - Google Sheets
n8n-nodes-base.googleSheets
From the author
🚀 How it works Handles GDPR Article 15 (access) and Article 17 (erasure) requests end-to-end — from inbound email to legally-compliant response — with zero manual intervention and a full audit trail. - 📬 Monitors Gmail inbox for incoming data subject…