Capture, score and route Gmail leads with Groq Llama 3.3, Supabase and Slack
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This AI workflow has 22 nodes and runs on Gmail events. Along the way it connects Supabase, Groq Chat Model, Slack and Gmail.
How it runs
Trigger: On Gmail events.
- Get a message (Gmail): get
- Normalize Incoming Lead Data (Edit Fields (Set)): sets 5 fields: name, message, threadId…
- Validate Lead Data (If): checks a condition and branches into true / false
- Notify New Lead (Slack) (Slack): uses Slack
- Store Lead in Database (Supabase): uses Supabase
- Wait: waits 1 hours
- Fetch Unscored Leads (Supabase): get many
- Fetch Scored Leads (Supabase): get many
- AI Lead Scoring Engine (AI Agent): runs an AI agent, with model: LLM (Scoring); output parser: Structured Output Parser
- Map AI Score Output (Edit Fields (Set)): sets 2 fields: Score, message
…plus 7 more steps. See the full node list below.
Services it uses
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) (Gmail Trigger1).
Nodes used (12)
- Supabase
n8n-nodes-base.supabase - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq - Switch
n8n-nodes-base.switch - Slack
n8n-nodes-base.slack - Gmail Trigger
n8n-nodes-base.gmailTrigger - Gmail
n8n-nodes-base.gmail - No Operation, do nothing
n8n-nodes-base.noOp - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Wait
n8n-nodes-base.wait
From the author
How it works This workflow captures incoming leads from Gmail, validates and stores them in Supabase, then uses AI to score and classify each lead. Based on the classification, leads are automatically routed to the appropriate Slack channel. It runs…