# Automated email classification & response system with Groq AI: n8n workflow

> Started by an arriving email, and works across Email, Pinecone and X. It puts Groq behind a retrieval step, so answers are drawn from documents you supply...

Source: https://millionrounds.com/workflow/automated-email-classification-and-response-system-with-groq (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [AI assistants](https://millionrounds.com/workflows?category=AI+assistants#library)

# Automated email classification & response system with Groq AI

Started by an arriving email, and works across Email, Pinecone and X. It puts Groq behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 34 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: Groq Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomated-email-classification-and-response-system-with-groq)

**34 steps** Large: read it before trusting it with anything live

**2** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 14 Logic 6 Service 13

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

- 1 **Email Trigger (IMAP)** Email Read Imap *Service*
- 2 **Groq Chat Model** Lm Chat Groq *Model*
- 3 **Groq Chat Model1** Lm Chat Groq *Model*
- 4 **Groq Chat Model2** Lm Chat Groq *Model*
- 5 **Groq Chat Model3** Lm Chat Groq *Model*
- 6 **Embeddings Cohere** Embeddings Cohere *Model*
- 7 **When clicking ‘Execute workflow’** Manual trigger *Starts it*
- 8 **Embeddings Cohere1** Embeddings Cohere *Model*
- 9 **Recursive Character Text Splitter** Text Splitter Recursive Character Text Splitter *Model*
- 10 **Code** Code *Logic*
- 11 **Basic LLM Chain** Chain Llm *Model*
- 12 **Sentiment Analysis of feedback** Sentiment Analysis *Model*
- 13 **RAG INQURY REPLY** Agent *Model*
- 14 **Basic LLM Chain1** Chain Llm *Model*
- 15 **Pinecone Vector Store** Vector Store Pinecone *Model*
- 16 **HTTP Request** Http Request *Service*
- 17 **Pinecone Vector Store1** Vector Store Pinecone *Model*
- 18 **Default Data Loader** Document Default Data Loader *Model*
- 19 **Switch1** Switch *Logic*
- 20 **CLEAN AI AGENT OUTPUT** Code *Logic*
- 21 **X** Twitter *Service*
- 22 **send email to team** Email Send *Service*
- 23 **send reply to customer** Email Send *Service*
- 24 **Code2** Code *Logic*
- 25 **Extract from File** Extract From File *Service*
- 26 **bill send to team** Email Send *Service*
- 27 **Send to customer** Email Send *Service*
- 28 **TO SALES TEAM** Email Send *Service*
- 29 **Switch** Switch *Logic*
- 30 **Code3** Code *Logic*
- 31 **send to support team** Email Send *Service*
- 32 **accepted confirm to candidate** Email Send *Service*
- 33 **rejection email** Email Send *Service*
- 34 **to hr** Email Send *Service*

## How it's built

- **Starts on:** An arriving email
- **Steps:** 34, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Email, Pinecone, X
- **Model:** Groq
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Email, Pinecone and X 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. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 34 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 34 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomated-email-classification-and-response-system-with-groq)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Email](https://millionrounds.com/workflows?service=Email#library)[Pinecone](https://millionrounds.com/workflows?service=Pinecone#library)[X](https://millionrounds.com/workflows?service=X#library)

## Workflows like it

Also ai assistants, with the same services where possible, closest in size first.

- [**Filter cybersecurity news for your tech stack with OpenAI** 35 steps · calls a model · Gmail, Pinecone](https://millionrounds.com/workflow/filter-cybersecurity-news-for-your-tech-stack-with-openai)
- [**Send GoHighLevel WhatsApp and email auto-replies with Redis** 36 steps · calls a model · Google Drive, Pinecone](https://millionrounds.com/workflow/send-gohighlevel-whatsapp-and-email-auto-replies-with-redis)
- [**Dynamic website assistant with DeepSeek** 28 steps · calls a model · Pinecone](https://millionrounds.com/workflow/dynamic-website-assistant-with-deepseek)
- [**Build a dual-stage RAG chat assistant with Google Drive** 27 steps · calls a model · Google Drive, Pinecone](https://millionrounds.com/workflow/build-a-dual-stage-rag-chat-assistant-with-google-drive)
- [**WhatsApp unofficial AI bot with Groq and Pinecone** 26 steps · calls a model · Pinecone, Redis](https://millionrounds.com/workflow/whatsapp-unofficial-ai-bot-with-groq-and-pinecone)
- [**Turn your portfolio into an AI assistant with OpenAI** 25 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/turn-your-portfolio-into-an-ai-assistant-with-openai)
