Manage Gemini File Search RAG stores and documents with n8n forms
Ready for 3.0What this workflow does
This workflow has 42 nodes and runs when someone submits an n8n form (“Gemini RAG — ingest documents”) (plus 1 other trigger). It uses only n8n's built-in nodes. It also calls generativelanguage.googleapis.com over HTTP.
How it runs
Trigger: When someone submits an n8n form (“Gemini RAG — ingest documents”) (plus 1 other trigger).
- If: checks a condition and branches into true / false
- Normalize Tool Input (Code): runs custom JavaScript code
- switch (Code): runs custom JavaScript code
- FS (HTTP Request): calls generativelanguage.googleapis.com (POST)
- Route Action (Switch): routes items into 7 branches
- loop (Loop Over Items (Split in Batches)): loops over the items in batches
- sn (Edit Fields (Set)): sets 2 fields: sname, displayName
- List RAG Stores (HTTP Request): calls generativelanguage.googleapis.com
- Create RAG Store (HTTP Request): calls generativelanguage.googleapis.com (POST)
- Get RAG Store (HTTP Request): calls an HTTP API
…plus 30 more steps. See the full node list below.
HTTP calls to: generativelanguage.googleapis.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - n8n Form
n8n-nodes-base.form - Switch
n8n-nodes-base.switch - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - n8n Form Trigger
n8n-nodes-base.formTrigger
From the author
Quick Overview This workflow creates and manages Gemini File Search RAG stores via an Agents tool, and ingests documents through an n8n Form that uploads files to Google’s Generative Language API for indexing. How it works 1. Receives tool calls from an n8n…