Monitor Gmail for compliance risks with Google Gemini and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 13 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Google Gemini Chat Model, Gmail and Google Sheets.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Catch Incoming Emails (Gmail): get many
- Strip Email Formatting (HTML): parses or builds HTML
- Analyze Compliance Risk (AI Agent): runs an AI agent, with model: Google Gemini Chat Model
- Clean & Parse AI Output (Code): runs custom JavaScript code
- Prep Variables for Routing (Edit Fields (Set)): sets 4 fields: risk_type, risk_level, confidence…
- Route by Risk Level (Switch): routes items into 3 branches
- Block Low-Confidence Alerts (Filter): keeps only the items that match a condition
- Generate Secure Incident ID (Crypto): hashes or encrypts values
- Save to Audit Log (Google Sheets): append
- Format AI Report (Markdown): converts between Markdown and HTML
…plus 1 more step. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Google Gemini + Google Sheets templates (819) · Other Google Gemini + Gmail templates (518)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (12)
- Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Gmail
n8n-nodes-base.gmail - HTML
n8n-nodes-base.html - AI Agent
@n8n/n8n-nodes-langchain.agent - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - Filter
n8n-nodes-base.filter - Crypto
n8n-nodes-base.crypto - Google Sheets
n8n-nodes-base.googleSheets - Markdown
n8n-nodes-base.markdown - Manual Trigger
n8n-nodes-base.manualTrigger
From the author
AI-Powered Email Monitoring & Compliance Risk Detection > Gmail + Gemini + Google Sheets --- This workflow automatically monitors incoming Gmail messages, analyzes them using Google Gemini AI for compliance risks (fraud, phishing, data leaks), filters…