Classify Gmail leads with Groq AI and sync SLA cases to Supabase via Redis
Ready for 3.0What this workflow does
This AI workflow has 25 nodes and runs on Gmail events (plus 2 other triggers). Along the way it connects Redis, Postgres, Gmail and Groq Chat Model. It also calls api.mem0.ai over HTTP.
How it runs
Trigger: On Gmail events (plus 2 other triggers).
- Pre-Filter Gmail by Labels (Code): runs custom JavaScript code
- Setup SLA Database (Postgres): run a query
- Set Parsing Fields (Edit Fields (Set)): sets 5 fields: message, execution, workflow…
- Batch Process Emails (Loop Over Items (Split in Batches)): loops over the items in batches
- Finalize SLA Setup (Code): runs custom JavaScript code
- Direct Emails by SLA Status (Switch): routes items into 4 branches
- Retrieve Gmail Email (Gmail): get
- Log to Supabase (Postgres): run a query
- Extract Email Info for Classification (Code): runs custom JavaScript code
- Classify Email Content (Information Extractor): extracts structured fields from text with AI, with model: Integrate Chat Model
…plus 11 more steps. See the full node list below.
Services it uses
HTTP calls to: api.mem0.ai
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.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (When Gmail Received).
Nodes used (15)
- Redis Trigger
n8n-nodes-base.redisTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Switch
n8n-nodes-base.switch - Postgres
n8n-nodes-base.postgres - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Gmail
n8n-nodes-base.gmail - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - Filter
n8n-nodes-base.filter - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq - Gmail Trigger
n8n-nodes-base.gmailTrigger - Wait
n8n-nodes-base.wait - Redis
n8n-nodes-base.redis - Edit Fields (Set)
n8n-nodes-base.set
From the author
Who’s it for This workflow is for contractors, freelancers, local service businesses, and small teams that receive leads and customer requests through Gmail but do not have a dedicated sales or admin team. What it does This template turns Gmail into an AI…