{"product_id":"manage-gemini-file-search-rag-stores-with-n8n-form","title":"Manage Gemini File Search RAG Stores with n8n Form","description":"\u003ch3\u003eManage Gemini File Search RAG stores end-to-end—upload documents from an n8n Form and query via an Agents tool\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow lets you \u003cstrong\u003ecreate, manage, and query Google Gemini File Search (RAG) stores\u003c\/strong\u003e, while ingesting documents through an \u003cstrong\u003en8n Form\u003c\/strong\u003e that uploads files to the Google Generative Language API for indexing.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives tool calls\u003c\/strong\u003e from an n8n Chat Agent with inputs such as \u003cem\u003eaction\u003c\/em\u003e, \u003cem\u003estoreName\u003c\/em\u003e, \u003cem\u003edocumentName\u003c\/em\u003e, \u003cem\u003equery\u003c\/em\u003e, and \u003cem\u003eforce\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes and routes requests\u003c\/strong\u003e to the correct operation: list stores, create a new store, get store status, run a grounded query against a selected store, list documents, delete a document, or delete a store.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eConnects to Google Generative Language API\u003c\/strong\u003e to:\n    \u003cul\u003e\n      \u003cli\u003elist\/create \u003cstrong\u003efileSearchStore\u003c\/strong\u003e resources,\u003c\/li\u003e\n      \u003cli\u003efetch store status,\u003c\/li\u003e\n      \u003cli\u003eexecute Gemini grounded queries against a chosen store.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eManages documents\u003c\/strong\u003e by listing documents in a store or deleting a specific document using \u003cem\u003edocumentName\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSafeguards store deletion\u003c\/strong\u003e: it deletes an entire store only when \u003cem\u003eforce\u003c\/em\u003e is explicitly set; otherwise it returns a “force-required” error message.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIngests files via an n8n Form\u003c\/strong\u003e: the form trigger either creates a new store or targets an existing one, then uploads\/imports each file into the Gemini File Search store for indexing.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOutputs a completion page\u003c\/strong\u003e showing the store ID (\u003cem\u003estoreName\u003c\/em\u003e) so you can use it in the Agents tool for ongoing querying and management.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eBuild a SaaS “knowledge base” where operators upload documents through an n8n Form and users query them via Gemini File Search.\u003c\/li\u003e\n  \u003cli\u003eManage multiple RAG stores for different tenants by creating per-tenant stores and ingesting files on demand.\u003c\/li\u003e\n  \u003cli\u003eDelete outdated documents from a store without touching the rest of the indexed content.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\u003c\/strong\u003e: Google Generative Language API (Gemini File Search \/ fileSearchStore endpoints).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes\/tools\u003c\/strong\u003e: if, set, code, form, switch, sticky note.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSetup\u003c\/strong\u003e: add Google Gemini credentials in n8n with access to the File Search and Gemini models endpoints; publish the workflow form and use its URL for file ingestion. For existing stores, paste the \u003cem\u003efileSearchStores\/... ID\u003c\/em\u003e into the form.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46063663644851,"sku":"N8N-19717","price":73.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/WlxHFa_lsyPVOfAtJK6tk_9LMeLPB2.png?v=1789808835","url":"https:\/\/buyflowscripts.com\/products\/manage-gemini-file-search-rag-stores-with-n8n-form","provider":"N8N Commerce","version":"1.0","type":"link"}