At a glance
- Trigger
- Email Trigger (IMAP) (Email Trigger (IMAP))
- Nodes
- 22
- Apps
- Email (IMAP), OpenAI, Email (SMTP), Qdrant and Google Drive
- AI nodes
- 14
- Credentials
- 6 types
- Category
- RAG, documents and vector search
Apps and integrations
Node types used
How it works
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
STEP 2
Documents vectorization with Qdrant and Google Drive
STEP 1
Create Qdrant Collection
Setup notes
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
STEP 3 - MAIN FLOW
- Transform the email into Markdown format for optimal reading by the LLM model
- Email Summarization through DeepSeek R1 (any model can be used)
- I classify the email in such a way as to continue only with emails regarding general information about the company. In this way I can respond independently through the information obtained from the vector database
- I create a chain where I entrust the review of the email to a high-performance model designed for this purpose
- I send the response email
Nodes in this workflow
The 22 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
- Email Trigger (IMAP) (Email Trigger (IMAP))
- Markdown (Markdown)
- DeepSeek R1 (OpenAI Chat Model)
- Send Email (Send Email)
- Qdrant Vector Store (Qdrant Vector Store)
- Embeddings OpenAI (OpenAI Embeddings)
- Email Classifier (Text Classifier)
- Email Summarization Chain (Summarization Chain)
- Write email (AI Agent)
- Review email (Basic LLM Chain)
- When clicking ‘Test workflow’ (Manual Trigger)
- Create collection (HTTP Request)
- Refresh collection (HTTP Request)
- Get folder (Google Drive)
- Download Files (Google Drive)
- Default Data Loader (Default Data Loader)
- Token Splitter (Token Splitter)
- Qdrant Vector Store1 (Qdrant Vector Store)
- Embeddings OpenAI1 (OpenAI Embeddings)
- OpenAI (OpenAI Chat Model)
- DeepSeek (OpenAI Chat Model)
- OpenAI 4-o-mini (OpenAI Chat Model)
Credentials you need
- Google Drive OAuth2 – used by Download Files and Get folder
- HTTP Header Auth – used by Create collection and Refresh collection
- IMAP – used by Email Trigger (IMAP)
- OpenAI API – used by DeepSeek, DeepSeek R1, Embeddings OpenAI and Embeddings OpenAI1 and others
- Qdrant API – used by Qdrant Vector Store and Qdrant Vector Store1
- SMTP – used by Send Email
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
How to import into n8n
- Download the JSON file with the button above.
- In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
- Open each node that shows a warning and select or create its credential.
- Read the notes on the canvas, test the workflow with sample data, then activate it.
Do you need somewhere to run it? Read our guide to self-hosted n8n.