Automation library · Lead generation

Capture, score and route Gmail leads with Groq Llama 3.3

Started by an arriving email, and works across Gmail, Slack and Supabase. It hands the judgement calls to Groq. 22 steps, 3 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Groq

22 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
1Loop or waits
3Services it connects to

The flow

Starts it 1Model 5Logic 7Service 9

The steps in the order they run, from what starts it.

  1. 1LLM (Classification)1Lm Chat GroqModel
  2. 2Gmail Trigger1Gmail triggerStarts it
  3. 3LLM (Scoring)1Lm Chat GroqModel
  4. 4Structured Output Parser1Output Parser StructuredModel
  5. 5AI Lead Classification Engine1AgentModel
  6. 6Get a message1GmailService
  7. 7AI Lead Scoring Engine1AgentModel
  8. 8Route Lead by Category1SwitchLogic
  9. 9Normalize Incoming Lead Data1SetLogic
  10. 10Map AI Score Output1SetLogic
  11. 11Send to Sales Channel1SlackService
  12. 12Send to Support Channel1SlackService
  13. 13Send to Billing Channel1SlackService
  14. 14End1No OpLogic
  15. 15Validate Lead Data1IfLogic
  16. 16Update Lead Score1SupabaseService
  17. 17Notify New Lead (Slack)1SlackService
  18. 18Store Lead in Database1SupabaseService
  19. 19Wait1WaitLogic
  20. 20Fetch Unscored Leads1SupabaseService
  21. 21Fetch Scored Leads1SupabaseService
  22. 22Check Message Exists1IfLogic

How it's built

Starts on
An arriving email
Steps
22, with 3 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Slack, Supabase
Model
Groq

Questions

What does it need to run?

An n8n account, plus your own Gmail, Slack and Supabase accounts, and a key for Groq. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an arriving email.

Does it use AI?

Yes. It calls Groq. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 22 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 22 steps before you point it at anything that matters.