AI email agents sound futuristic — like something out of Tony Stark’s J.A.R.V.I.S. But here’s the secret: you don’t need a PhD in AI or 5+ years of coding experience to build one.
Thanks to n8n, Mistral AI, and Milvus, you can create your own intelligent email assistant — for free. This guide will walk you step by step through setting it up.
By the end, you’ll have an agent that:
✅ Reads your contacts from a Google Doc
✅ Stores them in a free vector database (Milvus)
✅ Understands natural language commands with Mistral
✅ Sends personalized emails through Gmail
And yes — no paid AI API keys required. 🚀
🔧 Tools We’ll Use
- n8n → No-code workflow automation (your control center)
- Google Docs → Store your contact list
- Milvus (or Weaviate) → Free, open-source vector database
- Mistral → Open-source LLM for text parsing & generation
- Gmail → To send actual emails
Step 1: Create Your Contact Database in Google Docs
- Open a new Google Doc.
- Create a simple table like this:
Name | Email
-------------|-------------------
Kevin Levin | kevin@example.com
Gwen Tennyson| gwen@example.com
- Copy your Google Doc ID (the long string in the document URL). Example:
https://docs.google.com/document/d/THIS_PART_IS_THE_ID/edit
We’ll use this in n8n later.
Step 2: Set Up Milvus (Vector Database)
Unlike Pinecone (paid), Milvus is free and open source. You can host it locally with Docker:
docker pull milvusdb/milvus
docker run -p 19530:19530 milvusdb/milvus
- Milvus will store your contacts as embeddings.
- Install pymilvus if you want CLI control:
pip install pymilvus
This is where your agent will later “ask” things like “Who’s Kevin?”
Step 3: Load Contacts into Milvus with n8n
Now let’s bring your Google Docs contacts into Milvus using n8n.
Create a new workflow in n8n.
Add a Manual Trigger node.
Add a Google Docs node:
- Authenticate with your Google Cloud credentials.
- Action → Get Document.
- Enter your Google Doc ID.
Add a Split Text / JSON Extractor node → parse contact table into
{name, email}
pairs.Add an Embeddings node:
- Model:
mistral-embed
(via a free Hugging Face inference API or self-hosted model). - Input: names/emails.
- Add a Milvus node:
- Operation: Insert Vectors.
- Collection:
contacts
. - Fields:
{ vector: embedding, metadata: { name, email } }
.
- Connect:
Manual Trigger → Google Docs → Split/Parse → Embeddings → Milvus
Run once → your contacts are now searchable in Milvus! 🎉
Step 4: Build the Email Sending Tool in n8n
Now let’s give the agent the ability to send emails.
- Create a new workflow in n8n.
- Trigger → Webhook (so the main agent workflow can call it).
- Add a Gmail node:
- Connect via OAuth2 credentials.
- Action: Send Email.
- Fields:
To
,Subject
,Body
→ all set as expressions.
Example JSON structure the agent will pass:
{
"to": "kevin@example.com",
"subject": "Lunch?",
"message": "Hey Kevin, want to grab lunch tomorrow? Best, Kamal"
}
Save this workflow as Send Email Tool.
Step 5: Assemble the AI Agent Workflow
This is where the magic happens.
- Create another workflow in n8n → Trigger: Webhook (Chat Command).
- Add an Agent Node (Advanced AI → Tools Agent).
- Configure system message:
You are an AI Email Assistant.
Use Milvus to find contacts.
Use the Send Email Tool to send emails.
Always sign off with "Best, [Your Name]".
- Add Tools:
- Milvus Vector Store (retrieve emails).
- Send Email Tool (callable workflow).
- Add Mistral Node for natural language parsing:
- Input: user command (e.g., "Email Kevin about lunch").
- Output: structured JSON
{to, subject, message}
.
- Connect everything:
Webhook (Chat Input) → Mistral → Agent → (Milvus + Send Email Tool)
Debugging & Testing
- If Gmail errors → check OAuth consent screen.
- If Milvus returns empty → confirm embeddings model matches.
- If n8n errors → review Executions log for failed nodes.
🚀 What You’ve Built
✅ AI reads contact info from Google Docs
✅ Embeds and searches contacts in Milvus
✅ Parses natural commands with Mistral
✅ Sends emails via Gmail — automatically
All without writing a single line of complex backend code.
🌟 Next-Level Upgrades
- Add Google Calendar → “Schedule lunch with Kevin tomorrow at 1 PM.”
- Add labeling rules → auto-sort emails into categories.
- Add memory → let your agent remember previous conversations.
- Add multi-user mode → manage contacts & Gmail for teams.
🔑 Key Takeaway
You just built a production-ready AI Email Agent using:
- n8n (workflow engine)
- Google Docs (contact source)
- Milvus (free vector DB)
- Mistral (open-source AI brain)
- Gmail (real email sender)
No Pinecone, no OpenAI fees — completely free and open.
When your agent sends its first email, don’t be surprised if you feel like Iron Man. 😉
Top comments (0)