IT support chatbot with Google Drive, Pinecone & Gemini | AI doc processing
This n8n template empowers IT support teams by automating document ingestion and instant query resolution through a conversational AI. It integrates Google Drive, Pinecone, and a Chat AI agent (using Google Gemini/OpenRouter) to transform static support documents into an interactive, searchable knowledge base. With two interlinked workflows—one for processing support documents and one for handling chat queries—employees receive fast, context-aware answers directly from your support documentation.
Overview
Document Ingestion Workflow
- Google Drive Trigger: Monitors a specified folder for new file uploads (e.g., updated support documents).
- File Download & Extraction: Automatically downloads new files and extracts text content.
- Data Cleaning & Text Splitting: Utilizes a Code node to remove line breaks, trim extra spaces, and strip special characters, while a text splitter segments the content into manageable chunks.
- Embedding & Storage: Generates text embeddings using Google Gemini and stores them in a Pinecone vector store for rapid similarity search.
Chat Query Workflow
- Chat Trigger: Initiates when an employee sends a support query.
- Vector Search & Context Retrieval: Retrieves the top relevant document segments from Pinecone based on similarity scores.
- Prompt Construction: A Code node combines the retrieved document snippets with the user’s query into a detailed prompt.
- AI Agent Response: The constructed prompt is sent to an AI agent (using OpenRouter Chat Model) to generate a clear, step-by-step solution.
Key Benefits & Use Case
Imagine a large organization where every IT support document—from troubleshooting guides to system configurations—is stored in a single Google Drive folder. When an employee encounters an issue (e.g., “How do I reset my VPN credentials?”), they simply type the query into a chat interface. Instantly, the workflow retrieves the most relevant context from the ingested documents and provides a detailed, actionable answer. This process reduces resolution times, enhances support consistency, and significantly lightens the load on IT staff.
Prerequisites
- A valid Google Drive account with access to the designated folder.
- A Pinecone account for storing and retrieving text embeddings.
- Google Gemini (or OpenRouter) credentials to power the Chat AI agent.
- An operational n8n instance configured with the necessary nodes and credentials.
Workflow Details
1 Document Ingestion Workflow
- Google Drive Trigger Node:
- Listens for file creation events in the specified folder.
- Google Drive Download Node:
- Downloads the newly added file.
- Extract from File Node:
- Extracts text content from the downloaded file.
- Code Node (Data Cleaning):
- Cleans the extracted text by removing line breaks, trimming spaces, and eliminating special characters.
- Recursive Text Splitter Node:
- Segments the cleaned text into manageable chunks.
- Pinecone Vector Store Node:
- Generates embeddings (via Google Gemini) and uploads the chunks to Pinecone.
2 Chat Query Workflow
- Chat Trigger Node:
- Receives incoming user queries.
- Pinecone Vector Store Node (Query):
- Searches for relevant document chunks based on the query.
- Code Node (Context Builder):
- Sorts the retrieved documents by relevance and constructs a prompt merging the context with the query.
- AI Agent Node:
- Sends the prompt to the Chat AI agent, which returns a detailed answer.
How to Use
- Import the Template:
- Import the template into your n8n instance.
- Configure the Google Drive Trigger:
- Set the folder ID (e.g.,
1RQvAHIw8cQbtwI9ZvdVV0k0x6TM6H12P) and connect your Google Drive credentials.
- Set the folder ID (e.g.,
- Set Up Pinecone Nodes:
- Enter your Pinecone index details and credentials.
- Configure the Chat AI Agent:
- Provide your Google Gemini (or OpenRouter) API credentials.
- Test the Workflows:
- Validate the document ingestion workflow by uploading a sample support document.
- Validate the chat query workflow by sending a test query and verifying the returned support information.
Additional Notes
- Ensure all credentials (Google Drive, Pinecone, and Chat AI) are correctly set up and tested before deploying the workflows in production.
- The template is fully customizable. Adjust the text cleaning, splitting parameters, or the number of document chunks retrieved based on your support documentation's size and structure.
- This template not only enhances IT support efficiency but also offers a scalable solution for managing and leveraging growing volumes of support content.
IT Support Chatbot with Google Drive, Pinecone, and Gemini AI
This n8n workflow creates an intelligent IT support chatbot that can answer user queries by leveraging documents stored in Google Drive. It processes documents, embeds their content into a Pinecone vector store, and uses Google Gemini for conversational AI via OpenRouter.
What it does
This workflow automates the following steps:
- Triggers on Google Drive Changes: Monitors a specified Google Drive folder for new or updated documents.
- Extracts Document Content: When a change is detected, it downloads the file and extracts its text content.
- Loads Document Data: Prepares the extracted text for processing.
- Splits Text into Chunks: Breaks down large documents into smaller, manageable chunks suitable for embedding.
- Generates Embeddings: Uses Google Gemini to create vector embeddings for each text chunk.
- Stores in Pinecone: Uploads the text chunks and their embeddings to a Pinecone vector database.
- Listens for Chat Messages: A separate trigger listens for incoming chat messages (e.g., from a user asking a question).
- Generates AI Agent Response: When a chat message is received, an AI Agent (powered by OpenRouter Chat Model and Google Gemini Embeddings) queries the Pinecone vector store for relevant information based on the user's question.
- Provides IT Support: Uses the retrieved information to generate a comprehensive answer to the user's IT support query.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- Google Drive Account: A Google Drive account with documents relevant to IT support.
- Google Cloud Project: For Google Gemini Embeddings (ensure the Gemini API is enabled).
- Pinecone Account: A Pinecone API key and environment.
- OpenRouter Account: An OpenRouter API key for the Chat Model.
- Credentials in n8n:
- Google Drive OAuth2 credentials.
- Google Gemini Embeddings credentials.
- Pinecone credentials.
- OpenRouter credentials.
Setup/Usage
- Import the Workflow: Download the provided JSON and import it into your n8n instance.
- Configure Google Drive Trigger:
- Select your Google Drive credential.
- Specify the folder ID in Google Drive that contains your IT support documentation.
- Choose the event type to monitor (e.g., "New or Updated File").
- Configure Google Drive Node:
- Ensure it uses the same Google Drive credential.
- The operation should be "Download File" to retrieve the content of the changed document.
- Configure Extract from File Node:
- This node will automatically extract text from common document types (PDF, DOCX, TXT, etc.).
- Configure Recursive Character Text Splitter:
- Adjust
Chunk SizeandChunk Overlapas needed for your documents to optimize embedding quality.
- Adjust
- Configure Embeddings Google Gemini:
- Select your Google Gemini Embeddings credential.
- Configure Pinecone Vector Store:
- Select your Pinecone credential.
- Specify your Pinecone
Index Name.
- Configure When Chat Message Received Trigger:
- This node will act as your chatbot's entry point.
- Configure AI Agent:
- Select your OpenRouter Chat Model credential.
- Select your Google Gemini Embeddings credential.
- Select your Pinecone Vector Store credential.
- Customize the
System Messageto define the chatbot's persona and instructions (e.g., "You are an IT support assistant. Answer questions based on the provided documents.").
- Activate the Workflow: Save and activate the workflow.
Once activated, any new or updated documents in your specified Google Drive folder will automatically be processed and added to your Pinecone vector store, making their content available to the AI chatbot. Users can then interact with the chatbot via the "When chat message received" trigger to get answers to their IT support questions.
Related Templates
AI-Powered Invoice Processing Automation with Mistral OCR & GPT-5.2
🚀 Automate Invoice Processing with an End-to-End AI Workflow Powered by GPT-5.2 Transform your invoice management with a fully automated, AI-driven invoice processing workflow built on n8n, combining Mistral AI OCR and OpenAI GPT-5.2 for unmatched accuracy, scalability, and speed. This intelligent document automation system automatically extracts, structures, validates, and standardizes invoice data from PDFs and scanned documents—eliminating manual data entry and reducing accounting errors to near zero. 🔍 Key Features of This AI Invoice Automation Workflow ✅ Advanced OCR for Invoice Recognition Powered by Mistral AI’s state-of-the-art OCR, optimized for: Complex invoice layouts Multi-language documents Scanned PDFs and low-quality images Tables, line items, and financial fields ✅ Intelligent Invoice Data Extraction with GPT-5.2 Uses OpenAI GPT-5.2, the latest-generation language model, to: Understand invoice context and structure Identify vendors, customers, and payment terms Normalize inconsistent formats across suppliers Convert unstructured OCR text into clean, structured data ✅ Multi-Page Invoice Processing Automatically merges and processes multi-page invoices, ensuring: Accurate line-item continuity Correct totals and tax calculations Reliable page-by-page data consolidation ✅ Fully Automated, No-Code Workflow (n8n) From file upload to structured JSON output in seconds: Zero manual intervention Scalable for high invoice volumes Ideal for SMEs, enterprises, and finance teams ✅ Custom JSON Schema for Accounting Systems Exports standardized invoice data ready for: ERP systems Accounting software Finance dashboards Data warehouses 📊 Invoice Data Automatically Extracted Supplier and customer details Invoice number, issue date, due date Payment terms and currency Detailed line items (description, quantity, unit price, tax) Subtotals, VAT / tax breakdowns, grand totals User metadata and workflow query context 🔧 Technical Architecture & Workflow Overview This AI-powered invoice processing pipeline demonstrates how to: Monitor Google Drive for new invoice uploads Convert PDF or image files to Base64 Call Mistral AI OCR APIs with authentication Combine and clean multi-page OCR outputs Use GPT-5.2 AI agents with optimized system prompts Transform raw text into validated, structured JSON schemas Deliver production-ready data for downstream systems ⚡ Getting Started in Minutes Create a Mistral AI account → https://console.mistral.ai/ Configure your OpenAI API key for GPT-5.2 Connect your Google Drive credentials Import the n8n workflow and run 🚀 💼 Real-World Business Use Cases 📌 Finance & Accounting Automation Automatic invoice capture and reconciliation Faster month-end closing Reduced human error 📌 Accounts Payable & Expense Management Streamline vendor invoice processing Accelerate approval workflows Improve cash flow visibility 📌 Document Digitization & Data Extraction Convert PDFs and scanned invoices into structured data Centralize document intelligence 📌 Business Intelligence & Spend Analysis Analyze supplier spending Track cost categories Enable data-driven financial decisions 🌍 Why Combine OCR + GPT-5.2 for Invoice Processing? By combining best-in-class OCR technology with GPT-5.2’s deep contextual understanding, this workflow delivers: Higher extraction accuracy than rule-based systems Faster processing at scale Future-proof AI automation for finance operations 🔑 Keywords & SEO Tags invoiceProcessingAutomation AIInvoiceProcessing OCRInvoiceExtraction GPT52 OpenAIGPT52 MistralAI n8nAutomation AccountsPayableAutomation FinanceAutomation DocumentAI IntelligentDocumentProcessing InvoiceOCR
Multi-channel workflow error alerts with Telegram, Gmail & messaging apps
The Error Notification workflow is designed to instantly notify you whenever any other n8n workflow encounters an error, using popular communication channels like Telegram and Gmail—with optional support for Discord, Slack, and WhatsApp. 💡 Why Use Error Notification workflow? Immediate Awareness: Get instant alerts when workflows fail, preventing unnoticed errors and downtime. Multi-Channel Flexibility: Notify your team via Telegram, Gmail, and optionally Slack, Discord, or WhatsApp. Detailed Context: Receive rich error information including the error message, node name, time, and execution link for quicker fixes. Easy Integration: Built with native n8n nodes and customizable code, simple to adopt without complex setup. Open Source & Free: Use and adapt this workflow at no cost, making professional error monitoring accessible. ⚡ Who Is This For? n8n Workflow Developers: Quickly spot and respond to automation issues in development or production. Operations Teams: Maintain uptime and swiftly troubleshoot errors across multiple workflows. Small to Medium Businesses: Gain professional error alerting without expensive monitoring tools. Automation Enthusiasts: Enhance your automation reliability with real-time failure notifications. ❓ What Problem Does It Solve? This workflow embedd error detection and notification directly within your n8n instance. It automates the process of catching errors as they occur, compiling meaningful context, and delivering it instantly via your preferred messaging platforms. This drastically reduces your response time to issues and streamlines error management, improving your automation reliability and operational confidence. 🔧 What This Workflow Does ⏱ Trigger: Listens for any error generated in your n8n workflows using the n8n Error Trigger node. 📎 Step 2: Executes a Code node that formats a detailed error message capturing workflow name, error node, description, timestamp, and an execution URL. 🔍 Step 3: Sends the formatted error notification to multiple communication channels: Telegram and Gmail by default, plus optionally Discord, Slack, and WhatsApp (disabled by default). 💌 Step 4: Delivers rich, parsed HTML-formatted messages to ensure error readability and immediate actionability. 🔐 Setup Instructions Import the provided .json file into your n8n instance (Cloud or self-hosted). Set up credentials: Gmail OAuth credentials for sending emails via Gmail node Telegram API credentials for Telegram notifications (Optional) Discord Webhook URL credential for Discord notifications (Optional) Slack Webhook credential for Slack notifications (Optional) WhatsApp connection credentials (if enabled) Customize the Code node if needed to adjust the error message format or target chat IDs. Update the chat IDs and recipient details in each notification node according to your channels. Test the workflow by manually triggering an error in another workflow to verify proper notifications. 🧩 Pre-Requirements Active n8n instance (cloud or self-hosted) with version supporting Error Trigger node Telegram bot credentials and chat ID (Optional) Gmail, Discord, Slack, or WhatsApp accounts and webhook credentials if you want to use those channels 🛠️ Customize It Further Enable and configure additional notification nodes like Slack or WhatsApp to fit your team's communication style. Customize the error message template in the Code node to include extra metadata or format it differently (e.g., markdown). Integrate with incident management tools via webhook nodes or create tickets automatically on error. 🧠 Nodes Used Error Trigger Code Telegram Gmail Discord (disabled) Slack (disabled) WhatsApp (disabled) Sticky Note (for description) 📞 Support Made by: khaisa Studio Tag: notification,error,monitoring,workflow,automation,alerts Category: Monitoring & Alerts Need a custom? Need a custom? contact me on LinkedIn or Web
AI-driven competitor & market intelligence with GPT 4 & Apify
Automated AI-Driven Competitor & Market Intelligence System Problem Solved: Small and Medium-sized IT companies often struggle to stay ahead in a rapidly evolving market. Manually tracking competitor moves, pricing changes, product updates, and emerging market trends is time-consuming, inconsistent, and often too slow for agile sales strategies. This leads to missed sales opportunities, ineffective pitches, and a reactive rather than proactive market approach. Solution Overview: This n8n workflow automates the continuous collection and AI-powered analysis of competitor data and market trends. By leveraging web scraping, RSS feeds, and advanced AI models, it transforms raw data into actionable insights for your sales and marketing teams. The system generates structured reports, notifies relevant stakeholders, and stores intelligence in your database, empowering your team with real-time, strategic information. For Whom: This high-value workflow is perfect for: IT Solution Providers & SaaS Companies: To maintain a competitive edge and tailor sales pitches based on competitor weaknesses and market opportunities. Sales & Marketing Leaders: To gain comprehensive, automated market intelligence without extensive manual research. Product Development Teams: To identify market gaps and validate new feature development based on competitive landscapes and customer sentiment. Business Strategists: To inform strategic planning with data-driven insights into industry trends and competitive threats. How It Works (Scope of the Workflow) ⚙️ This system establishes a powerful, automated pipeline for market and competitor intelligence: Scheduled Data Collection: The workflow runs automatically at predefined intervals (e.g., weekly), initiating data retrieval from various online sources. Diverse Information Gathering: It pulls data from competitor websites (pricing, features, blogs via web scraping services), industry news and blogs (via RSS feeds), and potentially other sources. Intelligent Data Preparation: Collected data is aggregated, cleaned, and pre-processed using custom code to ensure it's in an optimal format for AI analysis, removing noise and extracting relevant text. AI-Powered Analysis: An advanced AI model (like OpenAI's GPT-4o) performs in-depth analysis on the cleaned data. It identifies competitor strengths, weaknesses, new offerings, pricing changes, customer sentiment from reviews, emerging market trends, and suggests specific opportunities and threats for your company. Automated Report Generation: The AI's structured insights are automatically populated into a professional Google Docs report using a predefined template, making the intelligence easily digestible for your team. Team Notification: Stakeholders (sales leads, marketing managers) receive automated notifications via Slack (or email), alerting them to the new report and key insights. Strategic Data Storage & Utilization: All analyzed insights are stored in a central database (e.g., PostgreSQL). This builds a historical record for long-term trend analysis and can optionally trigger sub-workflows to generate personalized sales talking points directly relevant to ongoing deals or specific prospects. --- Setup Steps 🛠️ (Building the Workflow) To implement this sophisticated workflow in your n8n instance, follow these detailed steps: Prepare Your Digital Assets & Accounts: Google Sheet (Optional, if using for CRM data): For simpler CRM, create a sheet with CompetitorName, LastAnalyzedDate, Strengths, Weaknesses, Opportunities, Threats, SalesTalkingPoints. API Keys & Credentials: OpenAI API Key: Essential for the AI analysis. Web Scraping Service API Key: For services like Apify, Crawlbase, or similar (e.g., Bright Data, ScraperAPI). Database Access: Credentials for your PostgreSQL/MySQL database. Ensure you've created necessary tables (competitorprofiles, markettrends) with appropriate columns. Google Docs Credential: To link n8n to your Google Drive for report generation. Create a template Google Doc with placeholders (e.g., {{competitorName}}, {{strengths}}). Slack Credential: For sending team notifications to specific channels. CRM API Key (Optional): If directly integrating with HubSpot, Salesforce, or custom CRM via API. Identify Data Sources for Intelligence: Compile a list of competitor website URLs you want to monitor (e.g., pricing pages, blog sections, news). Identify relevant online review platforms (e.g., G2, Capterra) for competitor products. Gather RSS Feed URLs from key industry news sources, tech blogs, and competitor's own blogs. Define keywords for general market trends or competitor mentions, if using tools that provide RSS feeds (like Google Alerts). Build the n8n Workflow (10 Key Nodes): Start a new workflow in n8n and add the following nodes, configuring their parameters and connections carefully: Cron (Scheduled Analysis Trigger): Set this to trigger daily or weekly at a specific time (e.g., Every Week, At Hour: 0, At Minute: 0). HTTP Request (Fetch Competitor Web Data): Configure this to call your chosen web scraping service's API. Set Method to POST, URL to the service's API endpoint, and build the JSON/Raw Body with the startUrls (competitor websites, review sites) for scraping, including your API Key in Authentication (e.g., Header Auth). RSS Feed (Fetch News & Blog RSS): Add the URLs of competitor blogs and industry news RSS feeds. Merge (Combine Data Sources): Connect inputs from both Fetch Competitor Web Data and Fetch News & Blog RSS. Use Merge By Position. Code (Pre-process Data for AI): Write JavaScript code to iterate through merged items, extract relevant text content, perform basic cleaning (e.g., HTML stripping), and limit text length for AI input. Output should be an array of objects with content, title, url, and source. OpenAI (AI Analysis & Competitor Insights): Select your OpenAI credential. Set Resource to Chat Completion and Model to gpt-4o. In Messages, create a System message defining AI's role and a User message containing the dynamic prompt (referencing {{ $json.map(item => ... ).join('\\n\\n') }} for content, title, url, source) and requesting a structured JSON output for analysis. Set Output to Raw Data. Google Docs (Generate Market Intelligence Report): Select your Google Docs credential. Set Operation to Create document from template. Provide your Template Document ID and map the Values from the parsed AI output (using JSON.parse($json.choices[0].message.content).PropertyName) to your template placeholders. Slack (Sales & Marketing Team Notification): Select your Slack credential. Set Chat ID to your team's Slack channel ID. Compose the Text message, referencing the report link ({{ $json.documentUrl }}) and key AI insights (e.g., {{ JSON.parse($json.choices[0].message.content).Competitor_Name }}). PostgreSQL (Store Insights to Database): Select your PostgreSQL credential. Set Operation to Execute Query. Write an INSERT ... ON CONFLICT DO UPDATE SQL query to store the AI insights into your competitorprofiles or markettrends table, mapping values from the parsed AI output. OpenAI (Generate Personalized Sales Talking Points - Optional Branch): This node can be part of the main workflow or a separate, manually triggered workflow. Configure it similarly to the main AI node, but with a prompt tailored to generate sales talking points based on a specific sales context and the stored insights. Final Testing & Activation: Run a Test: Before going live, manually trigger the workflow from the first node. Carefully review the data at each stage to ensure correct processing and output. Verify that reports are generated, notifications are sent, and data is stored correctly. Activate Workflow: Once testing is complete and successful, activate the workflow in n8n. This system will empower your IT company's sales team with invaluable, data-driven intelligence, enabling them to close more deals and stay ahead in the market.