✨ $500 AI Visibility Audit — live at Spurlock Studios. Book the audit

Customer Service

Telegram AI Assistant for Documents

This workflow creates a Telegram AI Assistant that answers user questions about uploaded PDF documents using Google Gemini and Supabase for knowledge base storage, and provides weather data via OpenWeatherMap.txt.

Built · ~7 hours saved per week

Telegram users who want to chat with their PDF documents and get information like weather updates. This workflow creates a Telegram bot. The bot answers questions using AI, fetches weather data, and processes PDF documents. It extracts text from PDFs, creates data embeddings, and stores these in a Supabase vector database. This lets the AI answer questions about your documents. Set up connections for Telegram, Google Gemini, OpenWeatherMap, and Supabase. You will also need credentials for your Google Gemini API and a Supabase account for storing document embeddings. Telegram account, Google Gemini API key, OpenWeatherMap API key, Supabase account. You can change the AI model, adjust the AI prompt instructions, and modify how the bot responds to users. You can also customize the text splitting and embedding process for documents. Key Technologies: Telegram,Google Gemini (AI),Supabase (Vector Database),OpenWeatherMap (Weather API),n8n (Workflow Automation) Automation Value: Automates responses to user queries in Telegram. Provides instant answers from uploaded PDF documents. Integrates external services like weather data. Manages document processing, including text extraction and embedding generation. Best Practices: Clear AI Prompt Engineering: The "AI Agent" node has a detailed system message. This tells the AI exactly how to respond, format, and handle different inputs (commands, PDFs). This ensures consistent and helpful AI behavior. Reliable Error Handling: The workflow includes specific paths for unsupported messages and a fallback for Telegram messages that fail to send with HTML formatting. This makes the bot more reliable. Modular AI Tools: The AI agent uses specialized tools (vector store, OpenWeatherMap) for different tasks. This design makes the AI more capable and easier to manage. Efficient Document Processing: Documents are processed in steps: download, text extraction, splitting, embedding, and storage. This structured approach ensures accurate information retrieval from PDFs. User Feedback Loop: The bot sends clear messages to the user about document processing status ("Processing document...", "Document processed...", "Document saved!").

Tags: Chatbot, RAG, Admin, Telegram, Supabase, AI Assistant

Integrations: Google Gemini, AI Agent, Telegram, Vector Store, Supabase, Code

Related automations

Back to the Automation Library