workflows.fit
Back to n8n workflows
n8n templateFreeBy Matteo

AI-powered email replies with spam filtering & FAQ lookup using GPT-4o mini & Pinecone

This n8n workflow automates the handling of incoming emails. It detects and filters out spam, searches a knowledge base (FAQ) stored in a Pinecone vector database, and sends a reply using Gmail — all powered by an AI ...

CommunicationHITLAILangchainCore NodesAgentLm Chat Open AiMemory Buffer Window
Loading interactive preview...

Template notes

This n8n workflow automates the handling of incoming emails. It detects and filters out spam, searches a knowledge base (FAQ) stored in a Pinecone vector database, and sends a reply using Gmail — all powered by an AI model (GPT-4o mini).

How It Works 1. Receiving Emails

- The Gmail Trigger node checks a Gmail inbox every hour.

- When a new email arrives, it starts the workflow.

2. Fetching Full Email Content

- The getmessage node retrieves all the details of the message: sender, subject, text, message ID, etc.

3. Spam Filtering

- The Spam checker node uses GPT-4o mini to classify the email as either "spam" or "no spam".