Mindket

Email replies drawn from a Qdrant knowledge base

Newversion 1 · updated

Overview

An n8n workflow that answers company questions sent by email. It summarizes each message, searches your documents in a Qdrant knowledge base, writes a reply with AI and sends it by SMTP.

Email replies drawn from a Qdrant knowledge base is an n8n workflow in the Business category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file, then run the first part once to build the knowledge base
  • Your own n8n server: the same file and steps
  • Qdrant: the collection that holds your documents as searchable pieces
  • Google Drive: the folder of documents the knowledge base is built from

Platform

Connects 5 apps

How it works

Trigger

New email in your mailbox

It starts when a new unread email arrives. A first part, which you start by hand, fills the knowledge base beforehand. The email brings:

  • The sender, as from
  • The subject
  • The HTML body, as textHtml

Actions

  1. Beforehand, a part you start by hand stores a Google Drive folder in Qdrant
  2. The email is turned into Markdown and summarized in up to 100 words
  3. A classifier keeps emails that ask about the company and ignores the rest
  4. An agent searches your Qdrant knowledge base for the answer
  5. It writes a reply of at most 100 words
  6. A second model formats the reply as HTML
  7. The reply is sent by SMTP to the sender, from the address that got the email

Result

Each company question gets an HTML reply drawn from your documents, and other emails are left alone

Integrations

What you need before you start.

Qdrant

Knowledge base

Stores your documents as searchable pieces, and lets the agent look up the ones that match a question.

NeedsA Qdrant address and API key, and a collection

OpenAI

Language models and embeddings

Runs the classifier and the reply writer, and turns documents and questions into vectors for the search.

NeedsOpenAI API key

OpenRouter

DeepSeek models

Runs deepseek-r1-0528 for the email summary and for the review of the reply, through an OpenAI credential with OpenRouter’s address.

NeedsAn OpenRouter API key

Google Drive

Documents

Lists the files in your folder and downloads each one as plain text.

NeedsA Google Drive OAuth2 credential, and a folder

Email (IMAP and SMTP)

Mailbox

Reads each new email and sends the reply.

NeedsIMAP and SMTP details for one mailbox

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
6 steps, starting by hand
Not reached
14 nodes no run reaches: Email Trigger (IMAP), Markdown, DeepSeek R1, Send Email, Qdrant Vector Store and 9 more
AI
1 step calls an AI model: Qdrant Vector Store1
Sign-ins
Signs in to: qdranturl, Google Drive, Qdrant and OpenAI
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 4 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow answers company questions that arrive by email, using your own documents. It has two parts. The first reads the files in a Google Drive folder, cuts them into pieces and stores them in a Qdrant collection. The second watches a mailbox over IMAP. Each new email becomes Markdown and a summary of up to 100 words. A classifier keeps only the emails that ask about the company, and the rest stop there. For those, an AI agent searches the Qdrant collection and writes a short reply. A second model formats it as HTML, and the workflow sends it by SMTP from the address that got the question. The file holds 26 nodes, three of them sticky notes.

Who it suits

Small teams and shops that get the same questions about hours, prices, delivery or policies, and keep the answers in Google Docs. Skip it if every reply needs a person’s approval, or if your customers write mostly about orders and accounts. As imported, the reply leaves your mailbox as soon as it is written.

Who uses it, and how
IndustryWho uses itHow they use itExample
RetailShop ownersAnswer questions about opening hours, delivery and returnsA bike shop gets a question about its return window, and the reply quotes its returns document.
HospitalityHotel front desksAnswer the standard questions about check-in and facilitiesA small hotel answers a question about parking from its guest guide.
EducationSchool officesReply to questions about fees and term datesA tutoring centre answers a question about its term dates from its handbook.
Professional servicesOffice managersAnswer first questions about services and pricesAn accounting firm replies with the services listed in its price sheet.

You need to know n8n and Qdrant: two OpenAI credentials, a Qdrant key, a collection to fill, a Google Drive folder and a mailbox that allows IMAP and SMTP.

Where to use it

Any n8n that can reach your mailbox, Qdrant, OpenAI, OpenRouter and Google Drive will run it. Qdrant can be Qdrant Cloud or a server of your own.

  • n8n Cloud: import the file, then run the first part once to build the knowledge base
  • Your own n8n server: the same file and steps
  • Qdrant: the collection that holds your documents as searchable pieces
  • Google Drive: the folder of documents the knowledge base is built from
  • Your mailbox: IMAP reads each new email, and SMTP sends the reply

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Have your Qdrant details and a Google Drive folder ready first.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own
QdrantAn address, an API key and a collection name of your choice
OpenAIAn API key for the reply writer, the classifier and the embeddings
OpenRouterAn API key, entered in a second OpenAI credential with the base URL https://openrouter.ai/api/v1, for the two DeepSeek nodes
GoogleA Google Drive OAuth2 credential, and a folder of Google Docs
EmailIMAP and SMTP details for one mailbox
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. In Create collection and Refresh collection, replace QDRANTURL with your Qdrant host and COLLECTION with a collection name of your choice. Add a Header Auth credential with the name api-key and your Qdrant key as the value, and select it in both nodes.
  3. Add a Qdrant API credential and select it in Qdrant Vector Store and Qdrant Vector Store1. In both, replace COLLECTION with the same name.
  4. Add an OpenAI credential and select it in OpenAI, OpenAI 4-o-mini, Embeddings OpenAI and Embeddings OpenAI1.
  5. Add a second OpenAI credential with the base URL https://openrouter.ai/api/v1 and your OpenRouter key, and select it in DeepSeek R1 and DeepSeek. Or pick an OpenAI model in both and use the first credential.
  6. Add a Google Drive OAuth2 credential and select it in Get folder and Download Files. In Get folder, choose your folder.
  7. Run the first part once from When clicking ‘Test workflow’. It creates the collection, clears it, then reads the folder, splits each document and stores the pieces.
  8. Add an IMAP credential and select it in Email Trigger (IMAP). Add an SMTP credential and select it in Send Email.
  9. Send a test question from another address, one that your documents answer. Read the reply, then press Publish.

How to use it

Nothing to open once it is published. Each new unread email in the INBOX starts a run. Run the first part again whenever your documents change.

What to change for a different result
To changeWhere
Which emails get an answerThe categories in Email Classifier
How the reply readsThe system message of Write email
The look and length of the replyThe prompt in Review email
Which documents it readsThe folder in Get folder
How documents are cut upToken Splitter, now 300 tokens with an overlap of 30
The modelsThe four chat model nodes

Example

A customer writes to a bike shop and asks how many days she has to return a helmet. The mailbox trigger picks the email up.

The workflow turns it into Markdown and writes a summary of about 100 words. The classifier files it under Company info request. The agent searches the knowledge base, finds the returns document and writes a short reply with the number of days. The review step formats it as HTML, and SMTP sends it back to the customer.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This file holds two separate flows. The first fills the knowledge base once, and you start it by hand. The second runs by itself for every new email. A knowledge base here is your documents cut into pieces and stored, so the agent can find the pieces that match a question. Test with your own address first.

For experts. The agent reads only the summary, and the first flow depends on the order of two branches.

Where to look closer
NodeWhat it doesWhat to know
Email Summarization ChainSummarizes the Markdown in up to 100 wordsThe prompts carry the email text through {{ $json.data }}, so keep that expression if you edit them
Email ClassifierPasses emails that ask about the company and sends the rest to Do nothingIt has one category, with other as the fallback
Write emailAn agent that searches Qdrant through Qdrant Vector Store and writes the replyIt gets the summary, not the original email, so details the summary drops are lost
Create collectionMakes the collection with 1536 dimensions and the Cosine distanceMindket matched the size to the default embedding model, text-embedding-3-small
Refresh collectionSends a delete-points request with an empty filter before each fillIt is meant to clear the collection, so try it on a throwaway one

Good to know

The reply goes out with no review, and two of its models are on OpenAI’s shutdown list.

  • Models: OpenAI and OpenAI 4-o-mini call gpt-4o-mini. OpenAI’s deprecations page, read on 12 November 2026, lists it for shutdown on 14 January 2027, with gpt-6-luna as the replacement
  • DeepSeek: the file named deepseek/deepseek-r1:free, which OpenRouter’s model list (read the same day) no longer shows. Mindket set deepseek/deepseek-r1-0528, which is a paid model
  • Collection: the file’s Create collection sent a POST with an empty filter, which does not create a collection. It now sends a PUT with the vector size and distance, and it continues on error, so a rerun still reaches Refresh collection
  • Matching models: the stored pieces and the searches must use the same embedding model. Change both embedding nodes and the vector size together
  • No review: the reply is sent as soon as it is written, from the address that got the email. Test with your own address
  • Any sender: nothing checks who wrote the email, so an automated sender that asks a company question gets a reply too
  • Read mail: the trigger marks each unread email it picks up as read, including the ones the classifier skips
  • Documents: Get folder returns up to 50 files, and Download Files converts Google Docs to plain text
  • Your data: email text goes to OpenAI and OpenRouter, and your documents go to OpenAI to be turned into vectors
  • Credentials: the JSON holds none

README and files

README

Email replies drawn from a Qdrant knowledge base

An n8n workflow that answers company questions sent by email, from your own documents. One part, which you start by hand,
reads a Google Drive folder and stores the documents in a Qdrant collection. The other part watches a mailbox over IMAP,
summarizes each new email, writes a reply with an AI agent that searches the collection, and sends it by SMTP.

What is inside

  • workflow.json: the workflow as n8n exports it, 26 nodes. Three are sticky notes that label the steps. It holds no
    credential.
  • README.md: these notes.

What we changed from the original copy

  • The two DeepSeek model nodes named deepseek/deepseek-r1:free, which OpenRouter no longer lists. They now name
    deepseek/deepseek-r1-0528.
  • Create collection sent a POST with an empty filter, which does not create a collection. It now sends a PUT with a vector
    size of 1536 and the Cosine distance, and it is set to continue if the collection already exists.
  • The folder ID in Get folder was a test folder of the author's. It is cleared, so choose yours.
  • Every credential link is gone, so select your own in each node that needs one.
  • Nothing else. The QDRANTURL and COLLECTION placeholders are as the original had them.

Before you start

  • An n8n instance, on n8n Cloud or your own server.
  • A Qdrant instance, on Qdrant Cloud or your own server, with its address and an API key.
  • An OpenAI API key, and an OpenRouter API key for the DeepSeek nodes (or an OpenAI model in their place).
  • A Google Drive folder of Google Docs that answer the questions you get.
  • A mailbox with IMAP and SMTP details, ideally a test one to start with.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. In Create collection and Refresh collection, replace QDRANTURL with your Qdrant host (with its port, if it needs one)
    and COLLECTION with a collection name of your choice. Add a Header Auth credential with the name api-key and your Qdrant
    key as the value, and select it in both nodes.
  3. Add a Qdrant API credential and select it in Qdrant Vector Store and Qdrant Vector Store1. In both, replace
    COLLECTION with the same collection name.
  4. Add an OpenAI credential and select it in OpenAI, OpenAI 4-o-mini, Embeddings OpenAI and Embeddings OpenAI1.
  5. Add a second OpenAI credential whose base URL is https://openrouter.ai/api/v1, with your OpenRouter key, and select it in
    DeepSeek R1 and DeepSeek. Or pick an OpenAI model in both and use the first credential.
  6. Add a Google Drive OAuth2 credential and select it in Get folder and Download Files. In Get folder, choose your
    folder.
  7. Run the first part once from When clicking ‘Test workflow’. It creates the collection, clears it, then reads the folder,
    splits each document and stores the pieces.
  8. Add an IMAP credential and select it in Email Trigger (IMAP). Add an SMTP credential and select it in Send Email.
  9. Send a test question from another address, one that your documents answer. Read the reply, then press Publish.

How a run goes

The first part, started by hand:

  1. When clicking ‘Test workflow’ starts Create collection and then Refresh collection, which sends a delete-points
    request with an empty filter before each fill.
  2. Get folder lists the files in your folder, and Download Files downloads each one as plain text.
  3. Default Data Loader and Token Splitter cut each file into pieces of 300 tokens with an overlap of 30.
  4. Embeddings OpenAI1 turns the pieces into vectors, and Qdrant Vector Store1 stores them.

The second part, for each new email:

  1. Email Trigger (IMAP) picks up an unread email from the INBOX and marks it read.
  2. Markdown converts the email's HTML, and Email Summarization Chain writes a summary of up to 100 words.
  3. Email Classifier keeps summaries of emails that ask about the company. The rest go to Do nothing.
  4. Write email is an agent. It searches the collection through Qdrant Vector Store and writes a reply from the summary.
  5. Review email formats the reply as HTML.
  6. Send Email sends it to the sender, from the address that received the email, with the subject Re: and the original
    subject.

Change the result

  • Which emails get an answer: the categories in Email Classifier.
  • How the reply reads: the system message of Write email.
  • The look and length of the reply: the prompt in Review email.
  • Which documents it reads: the folder in Get folder.
  • How documents are cut: Token Splitter.
  • The models: OpenAI, OpenAI 4-o-mini, DeepSeek R1 and DeepSeek. Change the embedding model in both embedding nodes
    and the vector size in Create collection together.

Good to know

  • OpenAI and OpenAI 4-o-mini call gpt-4o-mini. OpenAI's deprecations page, read on 12 November 2026, lists it for
    shutdown on 14 January 2027, with gpt-6-luna as its replacement.
  • deepseek/deepseek-r1-0528 is a paid model on OpenRouter (its model list, read the same day), unlike the free one the file
    named.
  • The stored pieces and the searches must use the same embedding model. Both embedding nodes use the node's default,
    text-embedding-3-small, which has 1536 dimensions, the size Create collection now asks for.
  • Create collection is set to continue on error, so a collection that exists already does not stop a rerun. A wrong address
    or key shows up in Refresh collection instead.
  • Refresh collection is meant to clear the collection before each fill. Try it on a throwaway collection first.
  • The reply is sent as soon as it is written, from the address that got the email, with no review. Test with your own address.
  • Nothing checks who sent an email, so an automated sender that asks a company question gets a reply too.
  • Write email reads the summary, not the email, so details the summary drops do not reach the reply.
  • Markdown converts the email's HTML part. Test with the kinds of email you receive, plain text as well.
  • Get folder returns up to 50 files, and Download Files converts Google Docs to plain text.
  • Email text goes to OpenAI and OpenRouter, and your documents go to OpenAI to be turned into vectors.
Files
NOTICE.md  657 B
README.md  6 KB
workflow.json  17 KB

3 files, 24 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

DeepSeek-R1-GGUF

unsloth · Kit

GGUF copies of the 671B DeepSeek-R1 reasoning model, with 1.58-bit and 2-bit dynamic quants, for running it in llama.cpp on a local machine with enough memory.

New

Axion-1.0-35B-GGUF

prithivMLmods · Kit

Provides GGUF files of Axion-1.0-35B, a 35B mixture-of-experts model with about 3B active parameters aimed at scientific reasoning, information seeking and too…

New

HEART

Phips · Kit

Upscales low-resolution images with a super-resolution network that trains on one consumer GPU and exports to ONNX. For people who train or run image upscalers.

New

Similar in Business

See all in Business

pplx-decider-v1.1-27b

perplexity-ai · Kit

Picks the best option for a decision from text and images, such as which team should handle a request, with a probability for each choice, for developers who b…

New

NuExtract3

numind · Kit

Reads documents as text or images and fills a JSON template with the fields you ask for, or converts the pages to Markdown. A 4B model for teams that process s…

New

Drex DLM

nace-ai · Kit

Scores yes or no, multiple choice and rating questions about a document in one pass, with a probability for every option. An 8B decision model from Nace.AI tha…

New