Back to Catalog

πŸ€– AI powered RAG chatbot for your docs + Google Drive + Gemini + Qdrant

Joseph LePageJoseph LePage
82407 views
2/3/2026
Official Page

πŸ€– AI-Powered RAG Chatbot with Google Drive Integration

This workflow creates a powerful RAG (Retrieval-Augmented Generation) chatbot that can process, store, and interact with documents from Google Drive using Qdrant vector storage and Google's Gemini AI.

How It Works

Document Processing & Storage πŸ“š

  • Retrieves documents from a specified Google Drive folder
  • Processes and splits documents into manageable chunks
  • Extracts metadata using AI for enhanced search capabilities
  • Stores document vectors in Qdrant for efficient retrieval

Intelligent Chat Interface πŸ’¬

  • Provides a conversational interface powered by Google Gemini
  • Uses RAG to retrieve relevant context from stored documents
  • Maintains chat history in Google Docs for reference
  • Delivers accurate, context-aware responses

Vector Store Management πŸ—„οΈ

  • Features secure delete operations with human verification
  • Includes Telegram notifications for important operations
  • Maintains data integrity with proper version control
  • Supports batch processing of documents

Setup Steps

  1. Configure API Credentials:

    • Set up Google Drive & Docs access
    • Configure Gemini AI API
    • Set up Qdrant vector store connection
    • Add Telegram bot for notifications
    • Add OpenAI Api Key to the 'Delete Qdrant Points by File ID' node
  2. Configure Document Sources:

    • Set Google Drive folder ID
    • Define Qdrant collection name
    • Set up document processing parameters
  3. Test and Deploy:

    • Verify document processing
    • Test chat functionality
    • Confirm vector store operations
    • Check notification system

This workflow is ideal for organizations needing to create intelligent chatbots that can access and understand large document repositories while maintaining context and providing accurate responses through RAG technology.

AI-Powered RAG Chatbot for Your Docs (Google Drive, Gemini, Qdrant)

This n8n workflow creates an AI-powered Retrieval-Augmented Generation (RAG) chatbot that can answer questions based on documents stored in your Google Drive. It leverages Google Gemini for conversational AI, OpenAI for embeddings, and Qdrant as a vector store to efficiently retrieve relevant information from your documents.

What it does

This workflow automates the following steps:

  1. Triggers on Chat Message: Initiates when a chat message is received, likely from a connected chat platform (e.g., Telegram, though not explicitly configured in the provided JSON).
  2. Initial Response: Sends a "Thinking..." message to acknowledge the user's query.
  3. Fetches Documents from Google Drive: Retrieves files from a specified Google Drive folder.
  4. Extracts Text from Files: Uses a "Default Data Loader" to extract textual content from the retrieved documents.
  5. Splits Text into Chunks: Breaks down the extracted document text into smaller, manageable chunks using a "Token Splitter" for efficient processing by the AI.
  6. Generates Embeddings: Creates numerical representations (embeddings) of these text chunks using OpenAI's embedding model.
  7. Stores Embeddings in Qdrant: Indexes the generated embeddings along with their corresponding text chunks in a Qdrant vector store. This allows for fast semantic search.
  8. Retrieves Relevant Documents: When a user asks a question, it queries the Qdrant vector store to find the most semantically similar document chunks.
  9. Generates AI Response: Feeds the user's question and the retrieved document chunks to a Google Gemini Chat Model.
  10. Maintains Conversation History: Uses a "Simple Memory" node to keep track of the conversation context, allowing for more coherent and continuous interactions.
  11. Sends AI Response: Delivers the AI-generated answer back to the user via Telegram.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • Google Drive Account: With documents you wish to use for the RAG system.
  • Google Gemini API Key: For the conversational AI model.
  • OpenAI API Key: For generating text embeddings.
  • Qdrant Instance: A running Qdrant vector database (self-hosted or cloud-managed).
  • Telegram Bot Token: If you intend to use Telegram as the chat interface (as indicated by the Telegram node).
  • n8n LangChain Nodes: Ensure the @n8n/n8n-nodes-langchain package is installed in your n8n instance.

Setup/Usage

  1. Import the Workflow: Import the provided JSON into your n8n instance.
  2. Configure Credentials:
    • Google Drive: Set up a Google OAuth2 credential for Google Drive to allow n8n to access your files.
    • Qdrant: Configure your Qdrant credential with the host and API key for your Qdrant instance.
    • OpenAI: Add your OpenAI API key credential.
    • Google Gemini: Add your Google Gemini API key credential.
    • Telegram: If using Telegram, set up a Telegram Bot API credential with your bot token.
  3. Configure Nodes:
    • Google Drive Node (ID: 58): Specify the folder ID in Google Drive containing the documents you want the chatbot to reference.
    • Qdrant Vector Store Node (ID: 1248):
      • Provide a unique Collection Name for your Qdrant collection.
      • Ensure the Embeddings field is correctly linked to the output of the "Embeddings OpenAI" node.
      • The Document field should point to the output of the "Token Splitter" node.
    • Google Gemini Chat Model Node (ID: 1262): Ensure the model is configured as desired (e.g., gemini-pro).
    • Telegram Node (ID: 49): Configure the Chat ID where the bot should send messages.
    • Chat Trigger Node (ID: 1247): This node will automatically generate a webhook URL once activated. Configure your chat platform (e.g., Telegram webhook) to send messages to this URL.
  4. Activate the Workflow: Once all credentials and nodes are configured, activate the workflow.

Your AI-powered RAG chatbot will now be ready to answer questions based on your Google Drive documents via the configured chat interface.

Related Templates

Automated YouTube video uploads with 12h interval scheduling in JST

This workflow automates a batch upload of multiple videos to YouTube, spacing each upload 12 hours apart in Japan Standard Time (UTC+9) and automatically adding them to a playlist. βš™οΈ Workflow Logic Manual Trigger β€” Starts the workflow manually. List Video Files β€” Uses a shell command to find all .mp4 files under the specified directory (/opt/downloads/单词卑/A1-A2). Sort and Generate Items β€” Sorts videos by day number (dayXX) extracted from filenames and assigns a sequential order value. Calculate Publish Schedule (+12h Interval) β€” Computes the next rounded JST hour plus a configurable buffer (default 30 min). Staggers each video’s scheduled time by order Γ— 12 hours. Converts JST back to UTC for YouTube’s publishAt field. Split in Batches (1 per video) β€” Iterates over each video item. Read Video File β€” Loads the corresponding video from disk. Upload to YouTube (Scheduled) β€” Uploads the video privately with the computed publishAtUtc. Add to Playlist β€” Adds the newly uploaded video to the target playlist. πŸ•’ Highlights Timezone-safe: Pure UTC ↔ JST conversion avoids double-offset errors. Sequential scheduling: Ensures each upload is 12 hours apart to prevent clustering. Customizable: Change SPANHOURS, BUFFERMIN, or directory paths easily. Retry-ready: Each upload and playlist step has retry logic to handle transient errors. πŸ’‘ Typical Use Cases Multi-part educational video series (e.g., A1–A2 English learning). Regular content release cadence without manual scheduling. Automated YouTube publishing pipelines for pre-produced content. --- Author: Zane Category: Automation / YouTube / Scheduler Timezone: JST (UTC+09:00)

ZaneBy Zane
226

Detect holiday conflicts & suggest meeting reschedules with Google Calendar and Slack

Who’s it for Remote and distributed teams that schedule across time zones and want to avoid meetings landing on public holidaysβ€”PMs, CS/AM teams, and ops leads who own cross-regional calendars. What it does / How it works The workflow checks next week’s Google Calendar events, compares event dates against public holidays for selected country codes, and produces a single Slack digest with any conflicts plus suggested alternative dates. Core steps: Workflow Configuration (Set) β†’ Fetch Public Holidays (via a public holiday API such as Calendarific/Nager.Date) β†’ Get Next Week Calendar Events (Google Calendar) β†’ Detect Holiday Conflicts (compare dates) β†’ Generate Reschedule Suggestions (find nearest business day that isn’t a holiday/weekend) β†’ Format Slack Digest β†’ Post Slack Digest. How to set up Open Workflow Configuration (Set) and edit: countryCodes, calendarId, slackChannel, nextWeekStart, nextWeekEnd. Connect your own Google Calendar and Slack credentials in n8n (no hardcoded keys). (Optional) Adjust the Trigger to run daily or only on Mondays. Requirements n8n (Cloud or self-hosted) Google Calendar read access to the target calendar Slack app with permission to post to the chosen channel A public-holiday API (no secrets needed for Nager.Date; Calendarific requires an API key) How to customize the workflow Time window: Change nextWeekStart/End to scan a different period. Holiday sources: Add or swap APIs; merge multiple regions. Suggestion logic: Tweak the look-ahead window or rules (e.g., skip Fridays). Output: Post per-calendar messages, DM owners, or create tentative reschedule events automatically.

Takuya OjimaBy Takuya Ojima
70

Generate Funny AI Videos with Sora 2 and Auto-Publish to TikTok

This automation creates a fully integrated pipeline to generate AI-powered videos, store them, and publish them on TikTok β€” all automatically. It connects OpenAI Sora 2, and Postiz (for TikTok publishing) to streamline content creation. --- Key Benefits βœ… Full Automation – From text prompt to TikTok upload, everything happens automatically with no manual intervention once set up. βœ… Centralized Control – Google Sheets acts as a simple dashboard to manage prompts, durations, and generated results. βœ… AI-Powered Creativity – Uses OpenAI Sora 2 for realistic video generation and GPT-5 for optimized titles. βœ… Social Media Integration – Seamlessly posts videos to TikTok via Postiz, ready for your audience. βœ… Scalable & Customizable – Can easily be extended to other platforms like YouTube, Instagram, or LinkedIn. βœ… Time-Saving – Eliminates repetitive steps like manual video uploads or caption writing. --- How it works This workflow automates the end-to-end process of generating AI videos and publishing them to TikTok. It is triggered either manually or on a recurring schedule. Trigger & Data Fetch: The workflow starts by checking a specified Form for new entries. It looks for rows where a video has been requested (a "PROMPT" is filled) but not yet generated (the "VIDEO" column is empty). AI Video Generation: For each new prompt found, the workflow sends a request to the Fal.ai Sora 2 model to generate a video. It then enters a polling loop, repeatedly checking the status of the generation request every 60 seconds until the video is "COMPLETED". Post-Processing & Upload: Once the video is ready, the workflow performs several actions in parallel: Fetch Video & Store: It retrieves the final video URL, downloads the video file Generate Title: It uses the OpenAI GPT-4o-mini model to analyze the original prompt and generate an optimized, engaging title for the video. Publish to TikTok: The video file is uploaded to Postiz, a social media scheduling tool, which then automatically publishes it to a connected TikTok channel, using the AI-generated title as the post's caption. --- Set up steps To make this workflow functional, you need to complete the following configuration steps: Prepare the Google Sheet: Create a Form with at least "PROMPT", "DURATION", and "VIDEO" fields. Configure Fal.ai for Video Generation: Create an account at Fal.ai and obtain your API key. In both the "Create Video" and "Get status" HTTP Request nodes, set up the "Header Auth" credential. Set the Name to Authorization and the Value to Key YOURAPIKEY. Set up TikTok Publishing via Postiz: Create an account on Postiz and connect your TikTok account to get a Channel ID. Obtain your Postiz API key. In the "Upload Video to Postiz" and "TikTok" (Postiz) nodes, configure the API credentials. In the "TikTok" node, replace the placeholder "XXX" in the integrationId field with your actual TikTok Channel ID from Postiz. (Optional) Configure AI Title Generation: The "Generate title" node uses OpenAI. Ensure you have valid OpenAI API credentials configured in n8n for this node to work. --- Need help customizing? Contact me for consulting and support or add me on Linkedin. Header 2

DavideBy Davide
24772