RAG chatbot for company documents using Google Drive and Gemini
This workflow implements a Retrieval Augmented Generation (RAG) chatbot that answers employee questions based on company documents stored in Google Drive. It automatically indexes new or updated documents in a Pinecone vector database, allowing the chatbot to provide accurate and up-to-date information. The workflow uses Google's Gemini AI for both embeddings and response generation. How it works The workflow uses two Google Drive Trigger nodes: one for detecting new files added to a specified Google Drive folder, and another for detecting file updates in that same folder. Automated Indexing: When a new or updated document is detected The Google Drive node downloads the file. The Default Data Loader node loads the document content. The Recursive Character Text Splitter node breaks the document into smaller text chunks. The Embeddings Google Gemini node generates embeddings for each text chunk using the text-embedding-004 model. The Pinecone Vector Store node indexes the text chunks and their embeddings in a specified Pinecone index. 7.The Chat Trigger node receives user questions through a chat interface. The user's question is passed to an AI Agent node. The AI Agent node uses a Vector Store Tool node, linked to a Pinecone Vector Store node in query mode, to retrieve relevant text chunks from Pinecone based on the user's question. The AI Agent sends the retrieved information and the user's question to the Google Gemini Chat Model (gemini-pro). The Google Gemini Chat Model generates a comprehensive and informative answer based on the retrieved documents. A Window Buffer Memory node connected to the AI Agent provides short-term memory, allowing for more natural and context-aware conversations. Set up steps Google Cloud Project and Vertex AI API: Create a Google Cloud project. Enable the Vertex AI API for your project. Google AI API Key: Obtain a Google AI API key from Google AI Studio. Pinecone Account: Create a free account on the Pinecone website. Obtain your API key from your Pinecone dashboard. Create an index named company-files in your Pinecone project. Google Drive: Create a dedicated folder in your Google Drive where company documents will be stored. Credentials in n8n: Configure credentials in your n8n environment for: Google Drive OAuth2 Google Gemini(PaLM) Api (using your Google AI API key) Pinecone API (using your Pinecone API key) Import the Workflow: Import this workflow into your n8n instance. Configure the Workflow: Update both Google Drive Trigger nodes to watch the specific folder you created in your Google Drive. Configure the Pinecone Vector Store nodes to use your company-files index.
Sync blog posts from Notion to Webflow
Who is this for? This template is for everyone who manages their blog entries in Notion and want to have an easy way to transform them to Webflow. What this workflow does This workflow syncs your blog posts saved in a Notion Database once a day to Webflow. Sync Notion properties, rich text and cover image with your collection. Works with most elements: H1, H2, H3, normal text, bold text, italic text, links, quotes, bulleted lists, numbered lists, and images (under 4MB). Set up steps Connect your accounts. Add a "slug" field in Notion. Add a "Sync to Webflow?" checkbox in Notion. Run a test and map your collection data. Whenever the workflow runs, all the checked posts will be updated in the Webflow collection, whether it's a new post or an existing one.
Extract invoice data from PDFs to JSON with Gemini AI and XML transformation
This n8n workflow converts invoices in PDF format into a structured, ready-to-use JSON, using AI and XML transformation — without writing any code. 🚀 How it works Upload form → The user uploads a PDF file. Text extraction → The PDF content is extracted as plain text. XML schema definition → A standard invoice structure is defined with fields such as: Invoice number Customer and issuer details Items with description, quantity, and price Totals and taxes Bank account details AI (Gemini) → The model rewrites the PDF text into a valid XML following the predefined schema. XML cleanup → Removes extra tags, line breaks, and unnecessary formatting. JSON conversion → The XML is transformed into a clean, structured JSON object, ready for integrations, APIs, or storage. ✨ Benefits Transforms unstructured PDFs into normalized JSON data. No coding required, only n8n nodes. Scalable to different invoice formats with minimal adjustments. Leverages AI to interpret complex textual content. 🛠️ Use cases Automating invoice data capture. Integration with ERPs, CRMs, or databases. Generating financial reports from PDFs.
Indonesian stock market research agent with Sectors App, Gemini & Tavily
This n8n workflow demonstrate how to configure AI Agent for financial research purposes especially for IDX data through Sectors App API. use cases: research stock market in Indonesia. analyze the performance of companies belonging to certain subsectors or company comparing financial metrics between BBCA and BBRI providing technical analysis for certain ticker stock movement and many more* all from conversational agent UI chat. Main components Input-n8nChatNative: handling and process input from native n8n chat ui Input-TelegramBot: handling and process input from Telegram Bot Input-WebUI(Webhook): handling and process input from hosted Web UI through webhook Main Agent: processing raw user queries and delegate task to specialized agent if needed. Spec Agent - Sectors App: make request to Sectors App API to get real time financial data listed in IDX from available endpoint Spec Agent - Web Search: make web search from Google Grounding (Gemini API) and Tavily Search. Vector Document Processing: process document upload from user into embedding and vector store. How it works user queries may received from multiple platform (we use three here: Telegram, hosted Web UI, and native n8n chat UI) if user also uploading document, it will process the document and store it in vector store the request send to the Main Agent to process the queries the Main Agent decide the task to delegate to Specialized Agent if nedded. the result then sent back to user based on the platform How to use You need this API: Gemini API: get it free from https://aistudio.google.com/ Tavily API: get it free from https://www.tavily.com/ Sectors App API: get it from https://sectors.app/api/ you can optionally change the model or adding fallback model to handle token request, cause it may use quite many tokens.