Perfect for:
User sends a message
Triggered by the Telegram bot, the workflow checks if the message is text.
Text message → OpenAI RAG Agent
If the message is text, it's passed to a GPT-powered document agent.
This agent:
Send answer back
The bot sends the generated response back to the Telegram user.
Non-text input fallback
If the message is not text, the bot replies with a polite unsupported message.
User uploads PDFs manually
A manual trigger starts the embedding flow.
Default Data Loader
Reads and chunks the PDF(s) into text segments.
Insert to Vector Store (Embedding)
Text chunks are embedded using OpenAI and saved for retrieval.
Backup to Google Drive
The original PDF is uploaded to Google Drive for safekeeping.
Telegram Bot
OpenAI
Google Drive
PDF Ingestion
Feature | How to Customize |
---|---|
Auto-ingest from folders | Add Google Drive/Dropbox watchers for new PDFs |
Add file upload via Telegram | Extend Telegram bot to receive PDFs and run the embedding flow |
Track user questions | Log Telegram usernames and questions to a database |
Summarize documents | Add summarization step on upload |
Add Markdown or HTML support | Format replies for better Telegram rendering |
Built with 💬 Telegram + 📄 PDF + 🧠 OpenAI Embeddings + ☁️ Google Drive + ⚡ n8n