What This Workflow Does
This automation solves the universal frustration of digging through endless emails to find specific information. Instead of manual searches, you can now ask natural language questions through Telegram and receive precise answers extracted from your email history.
The system combines Mistral AI's language understanding with Pgvector's semantic search capabilities (Retrieval-Augmented Generation). It indexes your emails as vector embeddings, allowing it to find conceptually similar content even when your query doesn't contain exact keywords from the original emails.
How It Works
1. Email Processing Pipeline
Your emails are periodically processed to extract their text content and convert it into vector embeddings using Mistral AI. These numerical representations capture the semantic meaning of each email.
2. Vector Database Storage
The embeddings are stored in a Pgvector database, which enables efficient similarity searches. This happens automatically in the background without manual intervention.
3. Telegram Query Interface
When you send a question through Telegram, the system converts your query into an embedding and searches for the most semantically similar email content in the database.
4. AI-Powered Response Generation
Mistral AI synthesizes the found information into a natural language response, providing you with a direct answer rather than just search results.
Who This Is For
This workflow benefits anyone who needs to regularly retrieve information from their email history:
- Professionals tracking client communications
- Students managing academic correspondence
- Travelers searching booking confirmations
- Shoppers finding purchase receipts
- Anyone who's ever wasted time searching emails
What You'll Need
- A Telegram account
- Email account with API access (Gmail, Outlook, etc.)
- PostgreSQL database with Pgvector extension
- Mistral AI API access
- n8n or Zapier account
Quick Setup Guide
- Download and import the workflow template
- Configure your email account connection
- Set up Pgvector database credentials
- Connect your Mistral AI API
- Deploy the Telegram bot and start chatting
Key Benefits
Save hours of manual searching - Get instant answers instead of scrolling through endless email threads.
Natural language understanding - Ask questions the way you think, without needing exact keywords.
Context-aware responses - The system understands temporal references and relationships between information.
Access from anywhere - Query your email history through Telegram on any device.
Privacy-focused design - Your emails remain under your control without third-party data mining.