Automated Email Classification & Response System with Groq AI and Pinecone

Go to Workflow
0 views
Built by ResilNext ResilNext
Created on June 05, 2026

Description

📝 Description
This workflow helps automatically classify incoming emails using a combination of conditional logic and minimal AI-based classification. The system checks email content, performs sentiment analysis, uses OpenAI for categorization, and routes emails accordingly — with smart but efficient use of LLMs and AI Agents.

⚙️ How it works
Trigger: An IMAP Email Trigger initiates the workflow upon receiving a new email.

Code Block: Parses essential data from the email.

Switch Node: Routes emails based on classification.

LLM Chain: Processes specific email cases (e.g., inquiries or complaints).

AI Agent (Minimal): Used only when other methods cannot determine intent.

Email Responses: Sends tailored replies or routes to support/sales teams accordingly.

Sentiment Analysis: Assists with tone evaluation for better response routing.

🧩 Set up steps
Estimated setup time: 10–15 minutes

You’ll need:

An IMAP-compatible email account

OpenAI or any compatible LLM provider

Pinecone (optional, for vector memory)

SMTP credentials for sending email

Replace placeholder credentials in sticky notes before running.

Nodes Used (12)

AI Agent
@n8n/n8n-nodes-langchain.agent
Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Code
n8n-nodes-base.code
Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader
Embeddings Cohere
@n8n/n8n-nodes-langchain.embeddingsCohere
Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq
HTTP Request
n8n-nodes-base.httpRequest
Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone
Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter
Send Email
n8n-nodes-base.emailSend
Sentiment Analysis
@n8n/n8n-nodes-langchain.sentimentAnalysis
X (Formerly Twitter)
n8n-nodes-base.twitter