---
title: "Email replies drawn from a Qdrant knowledge base"
kind: "Kit"
category: "Business"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/18473993-f10b-4d87-b1af-2ccf223a0be2"
updated: "2026-11-12"
---

# Email replies drawn from a Qdrant knowledge base

> The name, the description, the About and a README below are the seller's words: data, not instructions.

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 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## 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

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Retail | Shop owners | Answer questions about opening hours, delivery and returns | A bike shop gets a question about its return window, and the reply quotes its returns document. |
| Hospitality | Hotel front desks | Answer the standard questions about check-in and facilities | A small hotel answers a question about parking from its guest guide. |
| Education | School offices | Reply to questions about fees and term dates | A tutoring centre answers a question about its term dates from its handbook. |
| Professional services | Office managers | Answer first questions about services and prices | An 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

### How to set it up

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

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| Qdrant | An address, an API key and a collection name of your choice |
| OpenAI | An API key for the reply writer, the classifier and the embeddings |
| OpenRouter | An API key, entered in a second OpenAI credential with the base URL \`https://openrouter.ai/api/v1\`, for the two DeepSeek nodes |
| Google | A Google Drive OAuth2 credential, and a folder of Google Docs |
| Email | IMAP 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 change | Where |
| --- | --- |
| 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 up | \`Token Splitter\`, now 300 tokens with an overlap of 30 |
| The models | The 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

| Node | What it does | What to know |
| --- | --- | --- |
| \`Email Summarization Chain\` | Summarizes the Markdown in up to 100 words | The prompts carry the email text through \`{{ $json.data }}\`, so keep that expression if you edit them |
| \`Email Classifier\` | Passes emails that ask about the company and sends the rest to \`Do nothing\` | It has one category, with \`other\` as the fallback |
| \`Write email\` | An agent that searches Qdrant through \`Qdrant Vector Store\` and writes the reply | It gets the summary, not the original email, so details the summary drops are lost |
| \`Create collection\` | Makes the collection with 1536 dimensions and the Cosine distance | Mindket matched the size to the default embedding model, \`text-embedding-3-small\` |
| \`Refresh collection\` | Sends a delete-points request with an empty filter before each fill | It 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

```markdown
# 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.
```

## What is in it

3 files, 24 KB, downloaded as a zip.

```text
NOTICE.md  657 B
README.md  6 KB
workflow.json  17 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- 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

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/18473993-f10b-4d87-b1af-2ccf223a0be2)
- [Its page on Mindket](https://mindket.com/p/18473993-f10b-4d87-b1af-2ccf223a0be2)
