Chat with Email History via Telegram, Mistral & Pgvector RAG

Query your email history naturally via Telegram using RAG for semantic search and SQL for structured queries on Pgvector/Postgres. Fully local, open-source with Ollama.

n8n
Chat with Email History via Telegram, Mistral & Pgvector RAG

This n8n workflow transforms your email inbox into a conversational AI assistant. Users send natural language queries through Telegram, like 'What hotel did I stay in last summer?' or 'What were my semester grades?'. It leverages Retrieval-Augmented Generation (RAG) with vector similarity searches on embeddings stored in Pgvector, combined with structured SQL queries for precise results.

Built for privacy and cost-efficiency, it runs 100% locally using open-source tools: Ollama for LLM (Mistral compatible), nomic-embed-text for embeddings, and Postgres with Pgvector extension as the vector database. No cloud dependencies mean full data control and no API costs. It integrates semantic (fuzzy, context-aware) and structured (exact filters) searches, outperforming basic keyword tools.

Setup is straightforward: Use companion workflows to ingest Gmail emails into Pgvector embeddings and enable SQL composition. Customize Telegram credentials, AI models, and database connections, then activate. Ideal for personal knowledge retrieval, travel recaps, expense tracking, or professional correspondence analysis.

Benefits include time savings on manual email hunts, advanced AI without enterprise setups, and scalability for large inboxes. Perfect for individuals or small teams seeking a bleeding-edge, customizable email RAG system via n8n's no-code power.

$24.99
Last updated October 17, 2026
30-day money-back guarantee
Instant download
Lifetime updates included

New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.

Secure checkout powered by Stripe

Support

How to import this workflow into n8n

  1. 1Purchase or download the workflow to get the n8n workflow JSON file.
  2. 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
  3. 3Open each node marked with a credential warning and connect your own accounts and API keys.
  4. 4Run the workflow once manually to verify the data flow, then toggle it to Active.

Related Crypto & Blockchain workflows

More from Kaito Mensah

Need this deployed? We'll set it up for you.

Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.