AutomationMart
Home/Browse/Build a RAG system by uploading PDFs to the Google Gemini File Search Store
n8n

Build a RAG system by uploading PDFs to the Google Gemini File Search Store

n8nn8n14 modulesv1.0
LinkedInGemini

This workflow implements a Retrieval-Augmented Generation (RAG) system using Google Gemini's File Search API. It allows users to upload files to a dedicated search store and then ask questions about their content in a chat interface. The system automatically retrieves relevant information from the uploaded files to provide accurate, context-aware answers. --- Key Advantages 1. ✅ Seamless Integration of File Upload + AI Context The workflow automates the entire lifecycle: Upload file Index fil

At a glance

Build a RAG system by uploading PDFs to the Google Gemini File Search Store is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects LinkedIn, Gemini. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
LinkedIn, Gemini
Modules
14
Price
Free
Version
v1.0
Build a RAG system by uploading PDFs to the Google Gemini File Search Store workflow diagram

About this workflow

This workflow implements a Retrieval-Augmented Generation (RAG) system using Google Gemini's File Search API. It allows users to upload files to a dedicated search store and then ask questions about their content in a chat interface. The system automatically retrieves relevant information from the uploaded files to provide accurate, context-aware answers. --- Key Advantages 1. ✅ Seamless Integration of File Upload + AI Context The workflow automates the entire lifecycle: Upload file Index file Retrieve content for AI chat Everything happens inside one n8n automation, without manual actions. 2. ✅ Automatic Retrieval for Every User Query The AI agent is instructed to always query the Search Store. This ensures: More accurate answers Context-aware responses Ability to reference the exact content the user has uploaded Perfect for knowledge bases, documentation Q&A, internal tools, and support. 3. ✅ Reusable Search Store for Multiple Sessions Once created, the Search Store can be reused: Multiple files can be imported Many queries can leverage the same indexed data A sustainable foundation for scalable RAG operations. 4. ✅ Visual and Modular Workflow Design Thanks to n8n’s node-based flow: Each step is clearly separated Easy to debug Easy to expand (e.g., adding authentication, connecting to a database, notifications, etc.) 5. ✅ Supports Both Form Submission and Chat Messages The workflow is built with two entry points: A form for uploading files A chat-triggered entry point for RAG conversations Meaning the system can be embedded in multiple user interfaces. 6. ✅ Compliant and Efficient Interaction With Gemini APIs Your workflow respects the structure of Gemini’s File Search API: /fileSearchStores (create store) upload endpoint importFile endpoint generateContent with file search tools This ensures compatibility and future expandability. 7. ✅ Memory-Aware Conversations With the Memory Buffer node, the chat session preserves context across messages—providing a more natural and sophisticated conversational experience. --- How it Works STEP 1 - Create a new Search Store Triggered manually via the “Execute workflow” node, this step sends a request to the Gemini API to create a FileSearch Store, which acts as a private vector index for your documents. The store name is then saved using a Set node. This store will later be used for file import and retrieval. STEP 2 - Upload and import a file into the Search Store When the form is submitted (through the Form Trigger), the workflow: 1. Accepts a file upload via the form. 2. Uploads the file to Gemini using the /upload endpoint. 3. Imports the uploaded file into the Search Store, making it searchable. This step ensures content is stored, chunked, and indexed so the AI model can retrieve relevant sections later. STEP 3 - RAG-enabled Chat with Google Gemini When a chat message is received: The workflow loads the Search Store identifier. A LangChain Agent is used along with the Google Gemini Chat Model. The model is configured to always use the SearchStore tool, so every user query is enriched by a search inside the indexed files. The system retrieves relevant chunks from your documents and uses them as context for generating more accurate responses. This creates a fully functioning RAG chatbot powered by Gemini. --- Set up Steps Before activating this workflow, you must complete the following configuration: 1. Google Gemini API Credentials: Ensure you have a valid Google AI Studio API key. This key must be entered in all HTTP Request nodes (Create Store, Upload File, Import to Store, and SearchStore). 2. Configure the Search Store: Manually trigger the "Create Store" node once via the "Execute Workflow" button. This will call the Gemini API to create a new File Search Store and return its resource name (e.g., fileSearchStores/my-store-12345). Copy this resource name and update the "Get Store" and "Get Store1" Set nodes. Replace the placeholder value fileSearchStores/my-store-XXX in both nodes with the actual name of your newly created store. 3. Deploy Triggers: For production use, you should activate the workflow. This will generate public URLs for the "On form submission" node (for file uploads) and the "When chat message received" node (for the chat interface). These URLs can be embedded in your applications (e.g., a website or dashboard). Once these steps are complete, the workflow is ready. Users can start uploading files via the form and then ask questions about them in the chat. --- Need help customizing? Contact me for consulting and support or add me on Linkedin.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Daily calendar summary notifications via Telegram from Google Calendar

Context: This workflow automatically sends you a daily message on Telegram summarizing all your meetings and events for the day, straight from your Google Calendar. For who ? Perfect for anyone who: - Uses Google Calendar to manage their schedule. - Wants Telegram reminders for daily events. - Loves automation and productivity tools. Requirements: - Telegram. - Google account. - Google Calendar. Steps: 🗒️ Use the sticky notes in the n8n canvas to: - Add your Telegram and Google credentials. - E

Free

Generate captions from autocomplete ideas using Dumpling AI + GPT-4o

Who is this for? This workflow is perfect for social media managers, content creators, digital marketers, and copywriters who want to save time and stay relevant by automatically generating fresh caption ideas based on trending search behavior. --- 💡 What problem is this workflow solving? Manually coming up with engaging social media content is time-consuming and often hit-or-miss. This workflow leverages Google autocomplete to identify what users are searching for, then uses AI to convert those

Free

Analyze Google Forms feedback with Gemini AI and send weekly reports

Who is this for Product managers, customer success teams, and small business owners who collect feedback via Google Forms and want automated sentiment analysis without manual review. Ideal for teams processing 10-100+ responses weekly. What this workflow does This workflow reads new Google Forms responses from a linked Google Sheets spreadsheet, sends them to Gemini AI for sentiment analysis and topic categorization, then writes results back to the sheet, logs weekly insights in a Notion databas

Free

Automate lead qualification with RetellAI Phone Agent, OpenAI GPT & Google Sheet

Build a Phone Agent to qualify outbound leads and schedule inbound calls Who is this for? This workflow is designed for sales teams, call centers, and businesses handling both outbound and inbound lead calls who want to automate their qualification, follow-up, and call documentation process without manual intervention. It’s ideal for teams using Google Sheets, RetellAI, OpenAI, and Gmail as part

Free

Send personalized LinkedIn connection requests with Google Sheets and Unipile

Send personalized LinkedIn connection requests automatically using n8n, Google Sheets, and Unipile — with built-in safety limits, duplicate prevention, and full invitation tracking. --- Scale your LinkedIn outreach without manually sending a single connection request. This workflow reads your leads from a Google Sheet, filters out already-contacted prospects, and sends each one a personalized connection note via LinkedIn — automatically, on a schedule, and safely within LinkedIn's limits. Built

Free

BrowserAct Telegram Interview Assistant

This template provides a complete automated interview and quiz workflow powered by Make, BrowserAct, Google Gemini AI, and Telegram. It guides each user through a personalized interview experience by collecting their profile information, generating quiz questions, validating their responses, and storing all results inside Google Sheets. The workflow includes: Telegram Bot integration to receive user messages and deliver interactive quiz questions through inline keyboard buttons. BrowserAct lo

Free

Automated invoice management with Nextcloud, email and Telegram notifications

This workflow automatically fetches PDF invoices from a Nextcloud folder (/Invoice/Incoming), sends them via email to a fixed recipient (invoice@example.com), sends a Telegram notification, and archives the file to /Invoice/2025/archive. Key Steps: 1. Triggered daily at 8 AM 2. Lists files in /Invoice/Incoming 3. Filters for existing entries 4. Downloads the file 5. Sends the invoice via email 6. Sends a Telegram message with filename 7. Moves the file to archive 📦 Technologies used: - Nextcloud

Free

Full Instagram API MCP server

Need help? Want access to this workflow + many more paid workflows + live Q&A sessions with a top verified n8n creator? Join the community Complete MCP server exposing 27 Instagram API operations to AI agents. ⚡ Quick Setup 1. Import this workflow into your n8n instance 2. Credentials Add Instagram API credentials 3. Activate the workflow to start your MCP server 4. Copy the webhook URL from the MCP trigger node 5. Connect AI agents using the MCP URL 🔧 How it Works This workflow converts the Ins

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free