{"product_id":"build-a-secure-telegram-bot-with-n8n-google-drive-integration","title":"Build a Secure Telegram Bot with n8n \u0026 Google Drive Integration","description":"\u003cp\u003eTransform your private documents into an intelligent, secure Telegram chatbot that answers questions using your own local AI models—no external APIs required. This n8n workflow combines document ingestion from Google Drive with a PIN-protected Telegram bot powered by Ollama's local LLM stack.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cp\u003eTwo parallel automation flows work seamlessly together:\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eDocument Ingestion:\u003c\/strong\u003e Monitors your designated Google Drive folder for new files, automatically downloads them, splits content into 500-character chunks with 50-character overlap, creates embeddings using Ollama's nomic-embed-text model, and stores everything in PostgreSQL with pgvector extension\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eTelegram Bot Interface:\u003c\/strong\u003e Handles user registration with PIN verification, processes natural language questions, retrieves the top 5 most relevant document chunks via cosine similarity search, and generates contextual answers using qwen2.5:7b model—all while logging interactions for analysis\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003ePerfect use cases\u003c\/h3\u003e\n\u003cul\u003e\n\u003cli\u003eInternal knowledge bases for teams who need secure document search without cloud AI dependencies\u003c\/li\u003e\n\u003cli\u003ePrivate document Q\u0026amp;A systems for sensitive company information\u003c\/li\u003e\n\u003cli\u003eLocal LLM implementations where data privacy is paramount\u003c\/li\u003e\n\u003cli\u003eCustom chatbots for organizations running their own AI infrastructure with Ollama\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical implementation\u003c\/h3\u003e\n\u003cp\u003eBuilt with essential n8n nodes including PostgreSQL database integration, Telegram bot webhook handling, Google Drive OAuth2 connectivity, conditional logic flows, and custom code execution. The workflow leverages pgvector for efficient similarity search and integrates seamlessly with your existing Ollama installation.\u003c\/p\u003e\n\n\u003ch3\u003eSetup requirements\u003c\/h3\u003e\n\u003cp\u003eComplete setup instructions included: enable pgvector extension in PostgreSQL with provided SQL scripts, install Ollama with required models (nomic-embed-text and qwen2.5:7b), configure n8n credentials for Telegram Bot token from @BotFather, PostgreSQL connection, and Google Drive OAuth2 authentication.\u003c\/p\u003e\n\n\u003cp\u003eIdeal for developers, automation teams, and organizations prioritizing data security while building intelligent document search capabilities with full control over their AI stack.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45484208947379,"sku":"N8N-15031","price":16.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/kMarT_oiWTc_vht5JygJ1_1db03c5bb6114798a4a1809840e829b4.jpg?v=1777626604","url":"https:\/\/buyflowscripts.com\/products\/build-a-secure-telegram-bot-with-n8n-google-drive-integration","provider":"N8N Commerce","version":"1.0","type":"link"}