Skip to main content

Chat with PDF, CSV, and JSON documents using Google Gemini RAG

Workflow preview

Workflow preview
100%
Chat with PDF, CSV, and JSON documents using Google Gemini RAG preview
Open on n8n.io

1. Workflow Overview

Overview Turn documents into an AI powered knowledge base. Upload PDF, CSV, or JSON files and ask natural language questions about their content using a Retrieval Augmented Generation (RAG) workflo...

Best for

  • Document Extraction automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.formtrigger, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.vectorstoreinmemory, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.embeddingsgooglegemini

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Md Khalid Ali.

Original n8n.io source

1.1 Workflow description

Title
Chat with PDF, CSV, and JSON documents using Google Gemini RAG
Workflow name
Chat with PDF, CSV, and JSON documents using Google Gemini RAG

Overview

Turn documents into an AI-powered knowledge base.

Upload PDF, CSV, or JSON files and ask natural-language questions about their content using a Retrieval-Augmented Generation (RAG) workflow powered by Google Gemini. The workflow extracts, embeds, and semantically searches document data to generate accurate, source-grounded answers.

Designed as a simple and extensible starting point for building AI document assistants.


Key Features

  • Upload and analyze PDF, CSV, and JSON
  • AI chatbot with semantic document search
  • Retrieval-Augmented Generation (RAG) architecture
  • Answers grounded in uploaded documents
  • Beginner-friendly workflow with clear documentation
  • Easy to extend for production use

How It Works

  1. Upload a document via form trigger
  2. Content is split into searchable chunks
  3. Gemini generates embeddings
  4. Data is stored in a vector store
  5. The chatbot retrieves context and answers questions

Requirements

  • Google Gemini API credentials

Notes

  • Uses an in-memory vector store (data resets on restart)
  • Can be replaced with Pinecone, Supabase, Weaviate, or other persistent databases
  • Gemini API usage may incur costs depending on document size and query volume

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Document Upload Form

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.3

Block 2 - Add Metadata

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Vector Store Insert

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreInMemory - vectorStoreInMemory
Config choices
Version 1.3

Block 4 - Document Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1.1

Block 5 - Chatbot Trigger

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.4

Block 6 - Knowledge Base Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 7 - Chat Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 8 - Embeddings Google Gemini

Type / Role
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - embeddingsGoogleGemini
Config choices
Version 1

Block 9 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 10 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Vector Store Retrieve

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreInMemory - vectorStoreInMemory
Config choices
Version 1.3

Block 13 - Token Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 14 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Chat with PDF, CSV, and JSON documents using Google Gemini RAG
Complexity advanced
Nodes 17
Categories Document Extraction, AI RAG
Author Md Khalid Ali
Published 21 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13575/13575.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Chat with PDF, CSV, and JSON documents using Google Gemini RAG do?

Overview Turn documents into an AI powered knowledge base. Upload PDF, CSV, or JSON files and ask natural language questions about their content using a Retrieval Augmented Generation (RAG) workflo...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI RAG use case.