← All N8N workflows
AI & researchAgentChat TriggerCodeDocument Default Data LoaderEmbeddings Google Gemini

RAG

Configured with Agent, Chat Trigger, Document Default Data Loader, Embeddings Google Gemini, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
AI & modelsOpenAI Chat ModelOpenAI Chat ModelFiles / mediaDefault Data LoaderDocument Default Data Lo…AI & modelsRetrieve DocumentsTool Vector StoreFiles / mediaDownload FileGoogle DriveTriggerFile CreatedGoogle Drive TriggerTriggerFile UpdatedGoogle Drive TriggerData storePostgres Chat MemoryMemory Postgres ChatTransformRecursive CharacterText SplitterText Splitter Recursive …Data storeDelete Old Doc RowsSupabaseTransformSet File IDEdit FieldsTriggerWhen chat messagereceivedChat TriggerAI & modelsRAG AI AgentAgentData storeSupabase Vector StoreVector Store SupabaseData storeInsert into SupabaseVectorstoreVector Store SupabaseAI & modelsEmbeddings GoogleGeminiEmbeddings Google GeminiCodeCodeCodeAI & modelsEmbeddings GoogleGemini1Embeddings Google GeminiAI & modelsGoogle Gemini ChatModelLM Chat Google GeminiTransformExtract from FileExtract From File

Node categories in this workflow

  • AI & models
  • Files / media
  • Trigger
  • Data store
  • Transform
  • Code

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
OpenAI Chat ModelAI & modelsOpenAI Chat ModelSee node parameters
Default Data LoaderFiles / mediaDocument Default Data LoaderSee node parameters
Retrieve DocumentsAI & modelsTool Vector StoreSee node parameters
Download FileFiles / mediaGoogle Drivedownload
File CreatedTriggerGoogle Drive TriggerSee node parameters
File UpdatedTriggerGoogle Drive TriggerSee node parameters
Postgres Chat MemoryData storeMemory Postgres ChatSee node parameters
Recursive Character Text SplitterTransformText Splitter Recursive Character Text SplitterSee node parameters
Delete Old Doc RowsData storeSupabasedelete
Set File IDTransformEdit FieldsSee node parameters
When chat message receivedTriggerChat TriggerSee node parameters
RAG AI AgentAI & modelsAgentSee node parameters
Supabase Vector StoreData storeVector Store SupabaseSee node parameters
Insert into Supabase VectorstoreData storeVector Store SupabaseSee node parameters
Embeddings Google GeminiAI & modelsEmbeddings Google GeminiSee node parameters
CodeCodeCodeSee node parameters
Embeddings Google Gemini1AI & modelsEmbeddings Google GeminiSee node parameters
Google Gemini Chat ModelAI & modelsLM Chat Google GeminiSee node parameters
Extract from FileTransformExtract From Filepdf

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • googleDriveOAuth2Api
  • googlePalmApi
  • openAiApi
  • postgres
  • supabaseApi

Workflow notes

RAG

RAG

Purpose and structure

This folder contains the RAG workflow. Its executable nodes use agent, chatTrigger, code, documentDefaultDataLoader, embeddingsGoogleGemini, extractFromFile, googleDrive, googleDriveTrigger, lmChatGoogleGemini, lmChatOpenAi, memoryPostgresChat, set, supabase, textSplitterRecursiveCharacterTextSplitter, toolVectorStore, vectorStoreSupabase. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

File Created, File Updated, When chat message received

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/renebell0/n8n-rag-agent/blob/448dab3450b4f57b5277bfadf8f75dfab2ea4eec/RAG.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • Herramientas de Agentes para RAG
  • Herramienta para Agregar un Archivo de Google Drive a una Base de Datos Vectorial
  • Agente de IA con RAG y una Interfaz de Chat

More in AI & research