by Abdullahi Ahmed
Title RAG AI Agent for Documents in Google Drive → Pinecone → OpenAI Chat (n8n workflow) Short Description This n8n workflow implements a Retrieval-Augmented Generation (RAG) pipeline + AI agent, allowing users to drop documents into a Google Drive folder and then ask questions about them via a chatbot. New files are indexed automatically to a Pinecone vector store using OpenAI embeddings; the AI agent loads relevant chunks at query time and answers using context plus memory. Why this workflow matters / what problem it solves Large language models (LLMs) are powerful, but they lack up-to-date, domain-specific knowledge. RAG augments the LLM with relevant external documents, reducing hallucination and enabling precise answers. (Pinecone) This workflow automates the ingestion, embedding, storage, retrieval, and chat logic — with minimal manual work. It’s modular: you can swap data sources, vector DBs, or LLMs (with some adjustments). It leverages the built-in AI Agent node in n8n to tie all the parts together. (n8n) How to get the required credentials | Service | Purpose in Workflow | Setup Link | What you need / steps | | ------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | Google Drive (OAuth2) | Trigger new file events & download the file | https://docs.n8n.io/integrations/builtin/credentials/google/oauth-generic/ | Create a Google Cloud OAuth app, grant it Drive scopes, get client ID & secret, configure redirect URI, paste into n8n credentials. | | Pinecone | Vector database for embeddings | https://docs.n8n.io/integrations/builtin/credentials/pinecone/ | Sign up at Pinecone, in dashboard create an index, get API key + environment, paste into n8n credential. | | OpenAI | Embeddings + chat model | https://docs.n8n.io/integrations/builtin/credentials/openai/ | Log in to OpenAI, generate a secret API key, paste into n8n credentials. | You’ll configure these under n8n → Credentials → New Credential, matching credential names referenced in your workflow nodes. Detailed Walkthrough: How the Workflow Works Here’s a step-by-step of what happens inside your workflow (matching your JSON): 1. Google Drive Trigger Watches a specified folder in Google Drive. Whenever a new file appears (fileCreated event), the workflow is triggered (polling every minute). You must set the folder ID (in “folderToWatch”) to the Drive folder you want to monitor. 2. Download File Takes the file ID from the trigger and downloads the file content (binary). 3. Indexing Path: Embeddings + Storage (This path only runs when new files arrive) The file is sent to the Default Data Loader node (via the Recursive Character Text Splitter) to break it into chunks with overlap (so context is preserved). Each chunk is fed into Embeddings OpenAI to convert text into embedding vectors. Then Pinecone Vector Store (insert mode) ingests the vector + text metadata into your Pinecone index. This ensures your vector store stays up-to-date with files you drop into Drive. 4. Chat / Query Path (Triggered by user chat via webhook) When a chat message arrives via When Chat Message Received, it gets passed into the AI Agent node. Before generation, the AI Agent calls the Pinecone Vector Store1 set in “retrieve-as-tool” mode, which runs a vector-based retrieval using the user query embedding. The relevant text chunks are pulled as tools/context. The OpenAI Chat Model node is linked as the language model for the agent. Simple Memory** node provides conversational memory (keeping history across messages). The agent combines retrieved context + memory + user input and instructs the model to produce a response. 5. Connections / Flow Logic The Embeddings OpenAI node’s output is wired into Pinecone Vector Store (insert) and also into Pinecone Vector Store1 (so the same embeddings can be used for retrieval). The AI Agent has tool access to Pinecone retrieval and memory. The Download File node triggers the insert path. The When chat message triggers the agent path. Similar Workflows / Inspirations & Comparisons To help understand how your workflow fits into what’s already out there, here are a few analogues: n8n Blog: “Build a custom knowledge RAG chatbot”** — they show a workflow that ingests documents from external sources, indexes them in Pinecone, and responds to queries via n8n + LLM. (n8n Blog) Index Documents from Google Drive to Pinecone** — this is nearly identical for the ingestion part: trigger on Drive, split, embed, upload. (n8n) Build & Query RAG System with Google Drive, OpenAI, Pinecone** — shows the full RAG + chat logic, same pattern. (n8n) Chat with GitHub API Documentation (RAG)** — demonstrates converting API spec into chunks, embedding, retrieving, and chatting. (n8n) Community tutorials & forums** talk about using the AI Agent node with tools like Pinecone, and how the RAG part is often built as a sub-workflow feeding an agent. (n8n Community) What sets your workflow apart is your explicit combination: Google Drive → automatic ingestion → chat agent with tool integration + memory. Many templates show either ingestion or chat, but fewer show them combined cleanly with n8n’s AI Agent. Suggested Published Description (you can paste/adjust) > RAG AI Agent for Google Drive Documents (n8n workflow) > > This workflow turns a Google Drive folder into a live, queryable knowledge base. Drop PDF, docx, or text files into the folder → new documents are automatically indexed into a Pinecone vector store using OpenAI embeddings → you can ask questions via a webhook chat interface and the AI agent will retrieve relevant text, combine it with memory, and answer in context. > > Credentials needed > > * Google Drive OAuth2 (see: https://docs.n8n.io/integrations/builtin/credentials/google/oauth-generic/) > * Pinecone (see: https://docs.n8n.io/integrations/builtin/credentials/pinecone/) > * OpenAI (see: https://docs.n8n.io/integrations/builtin/credentials/openai/) > > How it works > > 1. Drive trigger picks up new files > 2. Download, split, embed, insert into Pinecone > 3. Chat webhook triggers AI Agent > 4. Agent retrieves relevant chunks + memory > 5. Agent uses OpenAI model to craft answer > > This is built on the core RAG pattern (ingest → retrieve → generate) and enhanced by n8n’s AI Agent node for clean tool integration. > > Inspiration & context > This approach follows best practices from existing n8n RAG tutorials and templates, such as the “Index Documents from Google Drive to Pinecone” ingestion workflow and “Build & Query RAG System” templates. (n8n) > > You're free to swap out the data source (e.g. Dropbox, S3) or vector DB (e.g. Qdrant) as long as you adjust the relevant nodes. If you like, I can generate a polished Markdown README for you (with badges, diagrams, instructions) ready for GitHub/n8n community publishing. Do you want me to build that? [1]: https://www.pinecone.io/learn/retrieval-augmented-generation/?utm_source=chatgpt.com "Retrieval-Augmented Generation (RAG) - Pinecone" [2]: https://n8n.io/integrations/agent/?utm_source=chatgpt.com "AI Agent integrations | Workflow automation with n8n" [3]: https://blog.n8n.io/rag-chatbot/?utm_source=chatgpt.com "Build a Custom Knowledge RAG Chatbot using n8n" [4]: https://n8n.io/workflows/4552-index-documents-from-google-drive-to-pinecone-with-openai-embeddings-for-rag/?utm_source=chatgpt.com "Index Documents from Google Drive to Pinecone with OpenAI ... - N8N" [5]: https://n8n.io/workflows/4501-build-and-query-rag-system-with-google-drive-openai-gpt-4o-mini-and-pinecone/?utm_source=chatgpt.com "Build & Query RAG System with Google Drive, OpenAI GPT-4o-mini ..." [6]: https://n8n.io/workflows/2705-chat-with-github-api-documentation-rag-powered-chatbot-with-pinecone-and-openai/?utm_source=chatgpt.com "Chat with GitHub API Documentation: RAG-Powered Chatbot ... - N8N"
by Oneclick AI Squad
This n8n workflow transforms simple chat requests into professional Center of Excellence (COE) blog posts using AI, then automatically publishes them to Google Drive. What Is This? An intelligent blog creation system that takes a topic from chat and produces executive-level blog posts. Uses three AI stages to ensure high-quality, professional content suitable for business consumption. Why Use This? Professional Content**: Creates sophisticated blogs with business insights Save Time**: Topic to published blog in 2-3 minutes No Writing Skills Needed**: AI handles all the writing and formatting Auto-Publishing**: Creates and shares Google Docs automatically Easy to Use**: Just chat your topic, get your blog How It Works 1. Blog Request & Planning Start Blog Request**: Chat interface receives your blog topic Create Blog Outline**: AI generates structured outline with sections AI Brain for Outline**: Powers the initial content planning 2. Content Review & Writing Review & Fix Outline**: AI improves outline structure and flow Write Full Blog Post**: Transforms outline into complete professional blog AI Brain for Review/Writing**: Advanced AI models handle content creation 3. Publish & Share Blog Clean Up Text Format**: Removes formatting issues for clean presentation Save Blog to Google Drive**: Creates properly formatted Google Doc Email Blog to Stakeholder**: Shares with specified team members Make Blog Public**: Creates shareable public link Send Blog Link to User**: Returns document URL via chat How to Use Start Chat: Access the chat interface and type your blog topic Wait: AI automatically processes (2-3 minutes) Get Your Blog: Receive Google Drive link to your published blog Good to Know Processing Time**: 2-3 minutes per blog Content Quality**: Uses advanced Gemini AI models for professional output Auto-Formatting**: Creates clean Google Docs ready for sharing Instant Sharing**: Stakeholders get email notifications automatically Public Access**: Generates shareable links for broader distribution Customizing This Workflow Content Style Modify AI prompts to match your company's writing tone Adjust content evaluation criteria for different audiences Change blog structure templates Publishing & Sharing Update stakeholder email addresses Change Google Drive folder destinations Modify sharing permissions (public/private) Add more distribution channels AI Enhancement Switch between different AI models for speed vs quality Add more review stages for specialized content Include company-specific knowledge sources
by Max Tkacz
This workflow is a generic example of how to load data from your workflow into a destination that stores tabular data. For example, a Google Sheets or Airtable sheet, a .CSV file, or any relational database like MySQL. Generally, you need to ensure that you send well-formatted data into the Spreadsheet or Database node. You can use the Set or Function node to transform data into the correct format for your destination. Key concepts Spreadsheets and databases have columns, like "Name" and "Email". The data you send into a Spreadsheet/ Database node needs to match these column names for each row of data that you want to insert. Data points need to be represented as key-value pairs. Specifically, each item of data needs to have a JSON key for each column in the sheet. For a spreadsheet with "Name" and "Email" columns, it would look like: {"Name" : "Karla", "Email" : "karla@email.com"} Before appending or inserting data to a spreadsheet or database, you might need to transform it into the correct format. You can preprocess the data with a Set or Function node. The Set node allows you to perform simple transforms when the data you want to load into spreadsheet rows is already represented as items. Use the Function node when you need to map nested data (like arrays) inside a single item to their own top-level items (Example in community forums). Spreadsheet and database nodes in n8n perform their configured action (like Append, Create Row, Write to File) on each item of input data. Workflow walkthrough
by Oneclick AI Squad
This AI-powered workflow reads emails, understands the request using an LLM, and creates structured Jira issues. Key Insights Poll for new emails every 5 minutes; ensure Gmail/IMAP is properly configured. AI analysis requires a reliable LLM model (e.g., Chat Model or AI Tool). Workflow Process Trigger the workflow with the Check for New Emails Gmail Trigger node. Fetch full email content using the Fetch Full Email Content get message node. Analyze email content with the Analyze Email & Extract Tasks node using AI. Parse the AI-generated JSON output into tasks with the Parse JSON Output from AI node. Create the main Jira issue with the Jira - Create Main Issue create: issue node. Split subtasks from JSON and create them with the Split Subtasks JSON Items and Create Subtasks create: issue nodes. Usage Guide Import the workflow into n8n and configure Gmail and Jira credentials. Test with a sample email to ensure ticket creation and subtask assignment. Prerequisites Gmail/IMAP credentials for email polling Jira API credentials with issue creation permissions Customization Options Adjust the Analyze Email & Extract Tasks node to refine AI task extraction or modify the polling frequency in the trigger node.
by LEDGERS
Before Using this Template first search LEDGERS in the nodes list and Update! The workflow automates contact creation in LEDGERS from a Google Sheets document, while performing validation checks on contact data to ensure data quality. Key Features: ✅ Google Sheets Trigger – Polls the sheet every minute to detect new or updated rows. ✅ Contact Name Validation – Checks if the contact name is provided; sends an email notification if missing. ✅ Email & Mobile Validation – Uses custom code to validate the format of email and mobile fields. ✅ Dynamic Routing – If both email and mobile are valid → proceeds to create the contact in LEDGERS. If either is invalid → sends an error notification via Gmail. ✅ Mobile Number Formatter – Extracts country code and mobile number for consistent formatting before creating the contact. ✅ LEDGERS API Integration – Creates the contact using the LEDGERS custom node. ✅ Error Handling – If contact creation fails (e.g., duplicate email), sends a failure email with details. ✅ Audit Trail – Appends results (including timestamps) back to Google Sheets for record-keeping. Extended Field Support This workflow is designed to be flexible. 👉 Along with core fields (Name, Email, Mobile), users can optionally map and include additional fields when creating a contact in LEDGERS, such as: Mobile Country Code GSTIN Business Name Billing Address 1 Billing Address 2 City State Country ➡ The workflow’s LEDGERS node can be configured to map these fields dynamically from Google Sheets if desired. Customization ✅ Users can extend or modify the workflow to handle these additional fields without needing structural changes — just by updating the mapping in the LEDGERS node parameters. Requirements: A connected Google Sheets document with at least Name column Configured Gmail credentials for sending email notifications A LEDGERS account with API access and credentials set up in n8n
by mail
Listen on new emails on a given IMAP mailbox. Converts the binary XML attachment to a stringified xmlproperty on the $data object and converts it to JSON. The Setnode could be replaced with Function nodes for example to do a conversion/mapping/transformation. The JSON is ultimately sent to a HTTP Endpoint via POST. This could be a starter for EDI purposes like receiving or transmitting XML data and conversion via JSON object property mapping.
by Harshil Agrawal
This workflow executes every minute and fetches the recent tweets from Twitter with the search query n8n_io. The workflow is built on the concept of polling. Cron node: The Cron node triggers the workflow every minute. Based on your use-case you can configure the time. You can even use the Interval node to trigger the workflow at a certain time interval. Twitter node: The Twitter node searches for the tweets that contain n8n_io and returns the most recent tweets. You can specify a different search query based on your use-case. Set node: The Set node sets the data that we pass on to the next nodes in the workflow. You can set only the values that you require in your workflow. Function node: All the magic happens in this node. The Twitter node returns all the recent tweets, including the ones which were returned earlier. The Function node, using the getWorkflowStaticData() method, only returns the tweets that are new, i.e., the tweets that were not returned in the previous workflow. Mattermost node: The Mattermost node sends the tweets from the Function node to the Twitter notifications channel. If you don't use Mattermost and want to share this data on a different platform, replace this node with the appropriate node.
by Yaron Been
This workflow provides automated access to the Jfirma1 Test_Model AI model through the Replicate API. It saves you time by eliminating the need to manually interact with AI models and provides a seamless integration for other generation tasks within your n8n automation workflows. Overview This workflow automatically handles the complete other generation process using the Jfirma1 Test_Model model. It manages API authentication, parameter configuration, request processing, and result retrieval with built-in error handling and retry logic for reliable automation. Model Description: test model Key Capabilities Specialized AI model with unique capabilities** Advanced processing and generation features** Custom AI-powered automation tools** Tools Used n8n**: The automation platform that orchestrates the workflow Replicate API**: Access to the Jfirma1/test_model AI model Jfirma1 Test_Model**: The core AI model for other generation Built-in Error Handling**: Automatic retry logic and comprehensive error management How to Install Import the Workflow: Download the .json file and import it into your n8n instance Configure Replicate API: Add your Replicate API token to the 'Set API Token' node Customize Parameters: Adjust the model parameters in the 'Set Other Parameters' node Test the Workflow: Run the workflow with your desired inputs Integrate: Connect this workflow to your existing automation pipelines Use Cases Specialized Processing**: Handle specific AI tasks and workflows Custom Automation**: Implement unique business logic and processing Data Processing**: Transform and analyze various types of data AI Integration**: Add AI capabilities to existing systems and workflows Connect with Me Website**: https://www.nofluff.online YouTube**: https://www.youtube.com/@YaronBeen/videos LinkedIn**: https://www.linkedin.com/in/yaronbeen/ Get Replicate API**: https://replicate.com (Sign up to access powerful AI models) #n8n #automation #ai #replicate #aiautomation #workflow #nocode #aiprocessing #dataprocessing #machinelearning #artificialintelligence #aitools #automation #digitalart #contentcreation #productivity #innovation
by Oneclick AI Squad
Overview This workflow retrieves airline web check-in URLs from Google Sheets, scrapes their content, employs an LLM to generate structured JSON data, refreshes the sheet, creates embeddings, and saves them in a Postgres vector DB for future semantic searches or question-answering. Quick Notes Verify that Google Sheets has accurate URLs for scraping. Ensure the Postgres vector DB is set up correctly for embedding storage. Process Flow Start the workflow with the Chat Trigger - Start node. Retrieve airline check-in URLs using the Fetch Airline URLs node. Scrape webpage data with the Scrape Airline Webpage node. Extract JSON data using the Extract info with LLM node with a Chat Model. Pause for a response with the Wait for Response node. Update Google Sheets with the Store Extracted Data node. Create embeddings with the Generate Embeddings node and store in Postgres vector DB with the Save to Vector DB node. Break down long text with the Split Long Text node and delay the next batch with the Wait Before Next Batch node. Getting Started Import the workflow into n8n and set up Google Sheets and Postgres vector DB credentials. Run a test with a sample URL to confirm scraping and embedding storage. Tailored Adjustments Tweak the Extract info with LLM node to adjust JSON output or modify the Fetch Airline URLs node to pull from different sheet fields.
by Yaron Been
This workflow provides automated access to the Settyan Flash V2.0.0 Beta.7 AI model through the Replicate API. It saves you time by eliminating the need to manually interact with AI models and provides a seamless integration for other generation tasks within your n8n automation workflows. Overview This workflow automatically handles the complete other generation process using the Settyan Flash V2.0.0 Beta.7 model. It manages API authentication, parameter configuration, request processing, and result retrieval with built-in error handling and retry logic for reliable automation. Model Description: Advanced AI model for automated processing and generation tasks. Key Capabilities Specialized AI model with unique capabilities** Advanced processing and generation features** Custom AI-powered automation tools** Tools Used n8n**: The automation platform that orchestrates the workflow Replicate API**: Access to the Settyan/flash-v2.0.0-beta.7 AI model Settyan Flash V2.0.0 Beta.7**: The core AI model for other generation Built-in Error Handling**: Automatic retry logic and comprehensive error management How to Install Import the Workflow: Download the .json file and import it into your n8n instance Configure Replicate API: Add your Replicate API token to the 'Set API Token' node Customize Parameters: Adjust the model parameters in the 'Set Other Parameters' node Test the Workflow: Run the workflow with your desired inputs Integrate: Connect this workflow to your existing automation pipelines Use Cases Specialized Processing**: Handle specific AI tasks and workflows Custom Automation**: Implement unique business logic and processing Data Processing**: Transform and analyze various types of data AI Integration**: Add AI capabilities to existing systems and workflows Connect with Me Website**: https://www.nofluff.online YouTube**: https://www.youtube.com/@YaronBeen/videos LinkedIn**: https://www.linkedin.com/in/yaronbeen/ Get Replicate API**: https://replicate.com (Sign up to access powerful AI models) #n8n #automation #ai #replicate #aiautomation #workflow #nocode #aiprocessing #dataprocessing #machinelearning #artificialintelligence #aitools #automation #digitalart #contentcreation #productivity #innovation
by victor de coster
The template allows to make Dropcontact batch requests up to 250 requests every 10 minutes (1500/hour). Valuable if high volume email enrichment is expected. Dropcontact will look for email & basic email qualification if first_name, last_name, company_name is provided. +++++++++++++++++++++++++++++++++++++++++ Step 1: Node "Profiles Query" Connect your own source (Airtable, Google Sheets, Supabase,...) the template is using Postgres by default. Note I: Be careful your source is only returning a maximum of 250 items. Note II: The next node uses the next variables, make sure you can map these from your source file: first_name last_name website (company_name would work too) full_name (see note) Note III: This template is using the Dropcontact Batch API, which works in a POST & GET setup. Not a GET request only to retrieve data, as Dropcontact needs to process the batch data load properly. +++++++++++++++++++++++++++++++++++++++++ Step 2: Node "Data Transformation" Will transform the input variables in the proper json format. This json format is expected from the Dropcontact API to make a batch request. "full_name" is being used as a custom identifier to update the returned email to the proper contact in your source database. To make things easy, use a unique identiefer in the full_name variable. +++++++++++++++++++++++++++++++++++++++++ Step3: Node: "Bulk Dropcontact Requests". Enter your Dropcontact credentials in the node: Bulk Dropcontact Requests. +++++++++++++++++++++++++++++++++++++++++ Step4: Connect your output source by mapping the data you like to use. +++++++++++++++++++++++++++++++++++++++++ Step5: Node: "Slack" (OPTIONAL) Connect your slack account, if an error occur, you will be notified. TIP: Try to run the workflow with a batch of 10 (not 250) as it might need to run initially before you will be able to map the data to your final destination. Once the data fields are properly mapped, adjust back to 250.
by Yaron Been
This workflow provides automated access to the Creativeathive Lemaar Door Wm AI model through the Replicate API. It saves you time by eliminating the need to manually interact with AI models and provides a seamless integration for other generation tasks within your n8n automation workflows. Overview This workflow automatically handles the complete other generation process using the Creativeathive Lemaar Door Wm model. It manages API authentication, parameter configuration, request processing, and result retrieval with built-in error handling and retry logic for reliable automation. Model Description: Advanced AI model for automated processing and generation tasks. Key Capabilities Specialized AI model with unique capabilities** Advanced processing and generation features** Custom AI-powered automation tools** Tools Used n8n**: The automation platform that orchestrates the workflow Replicate API**: Access to the Creativeathive/lemaar-door-wm AI model Creativeathive Lemaar Door Wm**: The core AI model for other generation Built-in Error Handling**: Automatic retry logic and comprehensive error management How to Install Import the Workflow: Download the .json file and import it into your n8n instance Configure Replicate API: Add your Replicate API token to the 'Set API Token' node Customize Parameters: Adjust the model parameters in the 'Set Other Parameters' node Test the Workflow: Run the workflow with your desired inputs Integrate: Connect this workflow to your existing automation pipelines Use Cases Specialized Processing**: Handle specific AI tasks and workflows Custom Automation**: Implement unique business logic and processing Data Processing**: Transform and analyze various types of data AI Integration**: Add AI capabilities to existing systems and workflows Connect with Me Website**: https://www.nofluff.online YouTube**: https://www.youtube.com/@YaronBeen/videos LinkedIn**: https://www.linkedin.com/in/yaronbeen/ Get Replicate API**: https://replicate.com (Sign up to access powerful AI models) #n8n #automation #ai #replicate #aiautomation #workflow #nocode #aiprocessing #dataprocessing #machinelearning #artificialintelligence #aitools #automation #digitalart #contentcreation #productivity #innovation