đź“– Answer electronics questions with Google Gemini, SerpAPI, and Supabase
⚡ 3 views · 📖 Internal Wiki & Knowledge Base
Description
Quick Overview
This chat-based workflow uses Google Gemini and a Supabase vector store to answer electronic component questions from indexed PDF datasheets, and when information is missing it searches Google via SerpAPI for a public datasheet PDF, downloads it, indexes it, and answers from the updated knowledge base.
How it works
- Receives a chat message and starts a Google Gemini-powered agent with conversation memory.
- Searches a Supabase vector store of embedded datasheet content to retrieve relevant passages for the user’s question.
- If the retrieved context is insufficient, uses SerpAPI (Google Search) to find a public PDF datasheet URL.
- Sends the PDF URL to a separate “Update Database” workflow/tool to trigger ingestion.
- In the ingestion path, downloads the PDF, extracts text, splits it into chunks, generates Google Gemini embeddings, and inserts the chunks into the Supabase “datasheets” vector table.
- Re-runs retrieval against Supabase and returns an answer in the chat using only the retrieved datasheet information.
Setup
- Add Google Gemini (PaLM) API credentials for both the chat model and the embeddings model.
- Configure Supabase credentials, create the
datasheetstable, enable the vector extension, and implement thematch_documentsRPC used for retrieval. - Add your SerpAPI API key in the SerpAPI HTTP request tool parameters.
- Publish the workflow and configure the “Update Database” tool to point to the target ingestion workflow ID used to download and index datasheet PDFs.
- If you use this as a chat assistant, copy the chat trigger webhook URL and connect it to your chat entry point (or use n8n’s built-in chat UI).
đź”— Nodes Used
HTTP Request, Execute Workflow Trigger, AI Agent, Simple Memory, Token Splitter, Call n8n Workflow Tool
📥 Import
Download workflow.json and import into n8n:
Workflow menu → Import from File