Skip to main content

Capture, score and route Gmail leads with Groq Llama 3.3, Supabase and Slack

Workflow preview

Workflow preview
100%
Capture, score and route Gmail leads with Groq Llama 3.3, Supabase and Slack preview
Open on n8n.io

1. Workflow Overview

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 automatica...

Best for

  • Lead Generation automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.supabase, n8n-nodes-base.set, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.lmchatgroq, n8n-nodes-base.switch, n8n-nodes-base.slack, n8n-nodes-base.gmailtrigger, n8n-nodes-base.gmail

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Avkash Kakdiya.

Original n8n.io source

1.1 Workflow description

Title
Capture, score and route Gmail leads with Groq Llama 3.3, Supabase and Slack
Workflow name
Capture, score and route Gmail leads with Groq Llama 3.3, Supabase and Slack

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 continuously with a wait cycle to process new and updated leads. The result is a fully automated lead qualification and routing system.

Step-by-step

  • Lead capture and validation

  • Gmail Trigger – Monitors inbox for new lead emails.

  • Get a message – Retrieves full email content.

  • Normalize Incoming Lead Data – Extracts name, message, email, and source.

  • Validate Lead Data – Ensures required fields are present.

  • Lead storage and notification

  • Notify New Lead (Slack) – Sends alert to Slack channel.

  • Store Lead in Database – Saves lead data in Supabase.

  • AI lead scoring pipeline

  • Wait – Delays execution before next cycle.

  • Fetch Unscored Leads – Retrieves leads with score = 0.

  • AI Lead Scoring Engine – Generates score and summary.

  • LLM (Scoring) – Provides AI model for scoring.

  • Structured Output Parser – Formats AI response.

  • Map AI Score Output – Prepares score data fields.

  • Update Lead Score – Updates score and status in database.

  • Lead qualification and classification

  • Fetch Scored Leads – Gets leads ready for routing.

  • Check Message Exists – Filters valid messages.

  • AI Lead Classification Engine – Categorizes lead type.

  • LLM (Classification) – Provides classification logic.

  • Smart routing and notifications

  • Route Lead by Category – Splits leads by category.

  • Send to Sales Channel – Sends sales leads to Slack.

  • Send to Support Channel – Sends support leads.

  • Send to Billing Channel – Sends billing-related leads.

  • End – Stops workflow for unmatched cases.

Why use this?

  • Automatically prioritizes high-quality leads using AI scoring
  • Eliminates manual lead sorting and routing effort
  • Ensures faster response by notifying the right team instantly
  • Centralizes lead data in a structured database
  • Scales easily for high-volume inbound lead processing

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Fetch Unscored Leads1

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 2 - Map AI Score Output1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Update Lead Score1

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 4 - Fetch Scored Leads1

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 5 - Check Message Exists1

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 6 - LLM (Classification)1

Type / Role
@n8n/n8n-nodes-langchain.lmChatGroq - lmChatGroq
Config choices
Version 1

Block 7 - Route Lead by Category1

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.4

Block 8 - Send to Sales Channel1

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 9 - Send to Support Channel1

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 10 - Send to Billing Channel1

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 11 - Store Lead in Database1

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 12 - Notify New Lead (Slack)1

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 13 - Gmail Trigger1

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1.3

Block 14 - Get a message1

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 15 - Validate Lead Data1

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 16 - Normalize Incoming Lead Data1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 17 - End1

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 18 - AI Lead Scoring Engine1

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 19 - LLM (Scoring)1

Type / Role
@n8n/n8n-nodes-langchain.lmChatGroq - lmChatGroq
Config choices
Version 1

Block 20 - AI Lead Classification Engine1

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 21 - Structured Output Parser1

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 22 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 28 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Capture, score and route Gmail leads with Groq Llama 3.3, Supabase and Slack
Complexity advanced
Nodes 28
Categories Lead Generation, AI Summarization
Author Avkash Kakdiya
Published 26 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14362/14362.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Capture, score and route Gmail leads with Groq Llama 3.3, Supabase and Slack do?

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 automatica...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation, AI Summarization use case.