AI Document Assistant via Telegram + Supabase
detail.loadingPreview
A Telegram bot powered by Google Gemini and Supabase for intelligent document Q&A.
About This Workflow
This workflow sets up a Telegram bot that acts as an AI Document Assistant. Users can upload PDF documents, and the bot will store their embeddings in a Supabase vector store. Subsequently, users can ask questions about the uploaded documents, and the AI, leveraging Google Gemini and the vector store, will provide answers. The workflow also handles general chatbot interactions and can integrate external tools like OpenWeatherMap.
Key Features
- Document Upload & Embedding: Accepts PDF documents, extracts text, generates embeddings using Google Gemini, and stores them in Supabase.
- Intelligent Q&A: Answers user questions based on the content of uploaded documents using a vector store.
- Telegram Integration: Seamlessly interacts with users via a Telegram bot.
- AI Agent Capabilities: Utilizes Google Gemini for advanced natural language understanding and response generation.
- Tool Integration: Can incorporate external tools like OpenWeatherMap for richer interactions.
- HTML Formatting for Telegram: Formats AI responses using Telegram's supported HTML syntax for a better user experience.
- Robust Error Handling: Includes mechanisms for handling potential issues with message formatting.
How To Use
- Set up Telegram Bot: Obtain a bot token from BotFather and configure it in the
Telegram accountcredentials. - Set up Google Gemini: Obtain an API key and configure it in the
Google Gemini(PaLM) Api accountcredentials. - Set up Supabase: Configure your Supabase project details (URL and API key) in the
Supabase accountcredentials. Ensure you have a table nameduser_knowledge_basewith a vector column suitable for storing embeddings. - Run the Workflow:
- For Document Q&A: Send a PDF file to your Telegram bot. The bot will process the document, embed it, and store it in Supabase. You will receive a confirmation message. Then, ask questions related to the document.
- For Chatbot Interaction: Send a text message to the bot. The AI will respond based on its general knowledge and configured system message. It can also potentially utilize integrated tools like OpenWeatherMap if prompted correctly (e.g., "What is the weather in London?").
- Advanced Features: The
Handle formatting and splitnode ensures that AI responses are properly formatted for Telegram, handling potential HTML issues and message length limits.
Apps Used
Workflow JSON
{
"id": "3c4ca282-eb01-48a6-9abb-dc9eb52f3345",
"name": "AI Document Assistant via Telegram + Supabase",
"nodes": 11,
"category": "AI",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 3c4ca282-eb01...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
DeepSeek AI Agent with Telegram and Long-Term Memory
A Telegram bot powered by DeepSeek AI that leverages long-term memory for personalized conversations and information storage.
AI-Powered Slack Bot for Automation Support
A workflow that receives messages via Slack webhook, processes them using an AI agent (Google Gemini) with conversational memory, and sends a response back to Slack.
OpenAI Assistant with Custom Fictional Country Tools
This workflow leverages an OpenAI Assistant to interact with custom tools for retrieving fictional country capitals and the current date.