XI AI

Automation · 2025

RAG Chatbot for Docs with Google Drive, n8n, Pinecone & Gemini AI

Built an AI-powered RAG chatbot using n8n, Google Drive, Pinecone, and Google Gemini for smart document automation.

Overview

Built an AI-powered RAG chatbot using n8n, Google Drive, Pinecone, and Google Gemini for smart document automation. The AI agent answers employee queries with real-time, context-aware responses from company docs. Automates file detection, vector embeddings, and semantic search using AI workflows. Supports PDFs, DOCX, TXT. Ideal for internal knowledge base, AI chatbot support, intelligent automation, and document Q&A systems.

Kind of work
Automation
Year
2025
Team
Tayyab Abbasi, Haris Awan, Malik Saad, Shoaib Nawab
Built with
  • AI Chatbot
  • n8n
  • Google APIs
  • AI Agent Development
  • Prompt Engineering

01 / 06

Project Summary

Developed a Retrieval-Augmented Generation (RAG) based chatbot that allows employees to ask questions and receive instant, AI-generated answers based on internal documents stored in Google Drive.
The system automatically tracks, indexes, and embeds documents using Pinecone and Google Gemini, ensuring answers are always accurate and up-to-date.


02 / 06

Problem Solved

Companies often struggle to manage and retrieve critical information scattered across multiple internal documents.
This project addresses that challenge by offering:

  • A centralized knowledge assistant
  • Instant access to policy, technical, or training documents via natural chat
  • Automatic document tracking and versioning without manual input

03 / 06

Tech Stack & Tools Used

  • n8n – Automation platform for orchestrating the workflow
  • Google Drive API – Triggers on new or updated documents
  • Google Gemini (Vertex AI + Gemini-pro) – Used for both text embeddings and generating responses
  • Pinecone – Vector database for semantic document search
  • Recursive Character Text Splitter – Breaks large documents into manageable chunks
  • Window Buffer Memory – Enables multi-turn conversations with short-term context

04 / 06

How It Works

1. Trigger

Listens for new or updated files in a specified Google Drive folder.

2. Document Processing

  • Downloads and splits documents
  • Embeds text chunks using text-embedding-004
  • Stores them in Pinecone for fast vector search

3. User Query Flow

  • User asks a question through a chat interface
  • Relevant document chunks are retrieved using vector search
  • Gemini-pro generates a context-aware, accurate response
  • Memory buffer allows follow-up questions for ongoing conversation

05 / 06

Testing & Output

  • Verified with multiple formats: PDFs, Google Docs, and .txt files
  • Handled thousands of text chunks with high retrieval precision
  • Demonstrated accuracy in retrieving policy information, FAQs, and HR data

06 / 06

Client Benefits

  • Reduces time employees spend searching for information
  • Easily scalable across departments or organizations
  • Zero manual re-training needed as documents evolve

Next case study

AI Voice Agent for Tenant Support & Real Estate Automation

Automation

Your turn

Want something like this?

Tell us what needs building and we will scope it — no charge, no obligation.

RAG Chatbot for Docs with Google Drive, n8n, Pinecone & Gemini AI, screen
Next · Automation