Who is this for? This template is designed for internal support teams, product specialists, and knowledge managers in technology companies who want to automate ingestion of product documentation and enable AI-driven, retrieval-augmented question answering via WhatsApp. What problem is this workflow solving? Support agents often spend too much time manually searching through lengthy documentation, leading to inconsistent or delayed answers. This solution automates importing, chunking, and indexing product manuals, then uses retrieval-augmented generation (RAG) to answer user queries accurately and quickly with AI via WhatsApp messaging. What these workflows do Workflow 1: Document Ingestion & Indexing Manually triggered to import product documentation from Google Docs. Automatically splits large documents into chunks for efficient searching. Generates vector embeddings for each chunk using OpenAI embeddings. Inserts the embedded chunks and metadata into a MongoDB Atlas vector store, enabling fast semantic search. Workflow 2: AI-Powered Query & Response via WhatsApp Listens for incoming WhatsApp user messages, supporting various types: Text messages: Plain text queries from users. Audio messages: Voice notes transcribed into text for processing. Image messages: Photos or screenshots analyzed to provide contextual answers. Document messages: PDFs, spreadsheets, or other files parsed for relevant content. Converts incoming queries to vector embeddings and performs similarity search on the MongoDB vector store. Uses OpenAI’s GPT-4o-mini model with retrieval-augmented generation to produce concise, context-aware answers. Maintains conversation context across multiple turns using a memory buffer node. Routes different message types to appropriate processing nodes to maximize answer quality. Setup Setting up vector embeddings 1. Authenticate Google Docs and connect your Google Docs URL containing the product documentation you want to index. 2. Authenticate MongoDB Atlas and connect the collection where you want to store the vector embeddings. Create a search index on this collection to support vector similarity queries. 3. Ensure the index name matches the one configured in n8n (data_index). 4. See the example MongoDB search index template below for reference. Setting up chat 1. Authenticate the WhatsApp node with your Meta account credentials to enable message receiving and sending. 2. Connect the MongoDB collection containing embedded product documentation to the MongoDB Vector Search node used for similarity queries. 3. Set up the system prompt in the Knowledge Base Agent node to reflect your company’s tone, answering style, and any business rules, ensuring it references the connected MongoDB collection for context retrieval. Make sure Both MongoDB nodes (in ingestion and chat workflows) are connected to the same collection with: An embedding field storing vector data, Relevant metadata fields (e.g., document ID, source), and The same vector index name configured (e.g., data_index). Search Index Example: { "mappings": { "dynamic": false, "fields": { "_id": { "type": "string" }, "text": { "type": "string" }, "embedding": { "type": "knnVector", "dimensions": 1536, "similarity": "cosine" }, "source": { "type": "string" }, "doc_id": { "type": "string" } } } }
This n8n workflow template creates an intelligent data analysis chatbot that can answer questions about data stored in Google Sheets using OpenAI's GPT-5 Mini model. The system automatically analyzes your spreadsheet data and provides insights through natural language conversations. What This Workflow Does Chat Interface: Provides a conversational interface for asking questions about your data Smart Data Analysis: Uses AI to understand column structures and data relationships Google Sheets Integration: Connects directly to your Google Sheets data Memory Buffer: Maintains conversation context for follow-up questions Automated Column Detection: Automatically identifies and describes your data columns Try It Out! --- 1. Set Up OpenAI Connection Get Your API Key 1. Visit the OpenAI API Keys page. 2. Go to OpenAI Billing. 3. Add funds to your billing account. 4. Copy your API key into your OpenAI credentials in n8n (or your chosen platform). --- 2. Prepare Your Google Sheet Connect Your Data in Google Sheets Data must follow this format: Sample Marketing Data First row contains column names. Data should be in rows 2–100. Log in using OAuth, then select your workbook and sheet. --- 3. Ask Questions of Your Data You can ask natural language questions to analyze your marketing data, such as: Total spend across all campaigns. Spend for Paid Search only. Month-over-month changes in ad spend. Top-performing campaigns by conversion rate. Cost per lead for each channel. --- Need Help or Want to Customize This? rbreen@ynteractive.com LinkedIn n8n Automation Experts
Document-Aware WhatsApp AI Bot for Customer Support Google Docs-Powered WhatsApp Support Agent 24/7 WhatsApp AI Assistant with Live Knowledge from Google Docs Description Template Smart WhatsApp AI Assistant Using Google Docs Help customers instantly on WhatsApp using a smart AI assistant that reads your company’s internal knowledge from a Google Doc in real time. Built for clubs, restaurants, agencies, or any business where clients ask questions based on a policy, FAQ, or services document. How it works Users send free-form questions to your WhatsApp Business number (e.g. “What are the gym rules?” or “Are you open today?”) The bot automatically reads your company’s internal Google Doc (policy, schedule, etc.) It merges the document content with today’s date and the user’s question to craft a custom AI prompt The AI (Gemini or ChatGPT) then replies back on WhatsApp using natural, helpful language All conversations are logged to Google Sheets for reporting or audit > Bonus: The AI even understands dates inside the document and compares them to today’s date — e.g. if your document says “Closed May 25 for 30 days,” it will say “We're currently closed until June 24. Set up steps 1. Connect your WhatsApp Cloud API account (Meta) 2. Add your Google account and grant access to the Doc containing your company info 3. Choose your AI model (ChatGPT/OpenAI or Gemini) 4. Paste your document ID into the Google Docs node 5. Connect your WhatsApp webhook to Meta (only takes 5 minutes) 6. Done — start receiving and answering customer questions! > Works best with free-tier OpenAI/Gemini, Google Docs, and Meta's Cloud API (no phone required). Everything is modular, extensible, and low-code. Customization Tips Change the Google Doc anytime to update answers — no retraining needed Add your logo and business name in the AI agent’s “System Prompt” Add fallback routes like “Escalate to human” if the bot can't help Clone for multiple brands by duplicating the workflow and swapping in new docs Need Help Setting It Up? If you'd like help connecting your WhatsApp Business API, setting up Google Docs access, or customizing this AI assistant for your business or clients… I offer setup, branding, and customization services: WhatsApp Cloud API setup & verification Google OAuth & Doc structure guidance AI model configuration (OpenAI / Gemini) Branding & prompt tone customization Logging, reporting, and escalation logic Just send a message via: Email: tharwat.elsayed2000@gmail.com WhatsApp: +20 106 180 3236
Build a 100% local RAG with n8n, Ollama and Qdrant. This agent uses a semantic database (Qdrant) to answer questions about PDF files. Tutorial Click here to view the YouTube Tutorial How it works Build a chatbot that answers based on documents you provide it (Retrieval Augmented Generation). You can upload as many PDF files as you want to the Qdrant database. The chatbot will use its retrieval tool to fetch the chunks and use them to answer questions. Installation 1. Install n8n + Ollama + Qdrant using the Self-hosted AI starter kit 2. Make sure to install Llama 3.2 and mxbai-embed-large as embeddings model. How to use it 1. First run the "Data Ingestion" part and upload as many PDF files as you want 2. Run the Chatbot and start asking questions about the documents you uploaded
This template quickly shows how to use RAG in n8n. Who is this for? This template is for everyone who wants to start giving knowledge to their Agents through RAG. Requirements Have a PDF with custom knowledge that you want to provide to your agent. Setup No setup required. Just hit Execute Workflow, upload your knowledge document and then start chatting. How to customize this to your needs 1. Add custom instructions to your Agent by changing the prompts in it. 2. Add a different way to load in knowledge to your vector store, e.g. by looking at some Google Drive files or loading knowledge from a table. 2. Exchange the Simple Vector Store nodes with your own vector store tools ready for production. 3. Add a more sophisticated way to rank files found in the vector store. For more information read our docs on RAG in n8n.
Use the n8n Data Tables feature to store, retrieve, and analyze survey results — then let OpenAI automatically recommend the most relevant course for each respondent. --- What this workflow does This workflow demonstrates how to use n8n’s built-in Data Tables to create an internal recommendation system powered by AI. It: Collects survey responses through a Form Trigger Saves responses to a Data Table called Survey Responses Fetches a list of available courses from another Data Table called Courses Passes both Data Tables into an OpenAI Chat Agent, which selects the most relevant course Returns a structured recommendation with: course: the course title reasoning: why it was selected > Trigger: Form submission (manual or public link) --- Who it’s for Perfect for educators, training managers, or anyone wanting to use n8n Data Tables as a lightweight internal database — ideal for AI-driven recommendations, onboarding workflows, or content personalization. --- How to set it up 1 Create your n8n Data Tables This workflow uses two Data Tables — both created directly inside n8n. Table 1: Survey Responses Columns: Name Q1 — Where did you learn about n8n? Q2 — What is your experience with n8n? Q3 — What kind of automations do you need help with? To create: 1. Add a Data Table node to your workflow. 2. From the list, click “Create New Data Table.” 3. Name it Survey Responses and add the columns above. --- Table 2: Courses Columns: Course Description To create: 1. Add another Data Table node. 2. Click “Create New Data Table.” 3. Name it Courses and create the columns above. 4. Copy course data from this Google Sheet: https://docs.google.com/spreadsheets/d/1Y0Q0CnqN0w47c5nCpbA1O3sn0mQaKXPhql2Bc1UeiFY/edit?usp=sharing This Courses Data Table is where you’ll store all available learning paths or programs for the AI to compare against survey inputs. --- 2 Connect OpenAI 1. Go to OpenAI Platform 2. Create an API key 3. In n8n, open Credentials → OpenAI API and paste your key 4. The workflow uses the gpt-4.1-mini model via the LangChain integration --- Key Nodes Used | Node | Purpose | n8n Feature | |------|----------|-------------| | Form Trigger | Collect survey responses | Forms | | Data Table (Upsert) | Stores results in Survey Responses | Data Tables | | Data Table (Get) | Retrieves Courses | Data Tables | | Aggregate + Set | Combines and formats table data | Core nodes | | OpenAI Chat Model (LangChain Agent) | Analyzes responses and courses | AI | | Structured Output Parser | Returns structured JSON output | LangChain | --- Tips for customization Add more Data Table columns (e.g., email, department, experience years) Use another Data Table to store AI recommendations or performance results Modify the Agent system message to customize how AI chooses courses Send recommendations via Email, Slack, or Google Sheets --- Why Data Tables? This workflow shows how n8n’s Data Tables can act as your internal database: Create and manage tables directly inside n8n No external integrations needed Store structured data for AI prompts Share tables across multiple workflows All user data and course content are stored securely and natively in n8n Cloud or Self-Hosted environments. --- Contact Need help customizing this (e.g., expanding Data Tables, connecting multiple surveys, or automating follow-ups)? robert@ynteractive.com Robert Breen ynteractive.com
Turn any prompt into structured web data. Send a POST request with a natural language prompt and an optional JSON schema, and get back clean, structured results scraped from the web by an AI agent powered by Firecrawl. Use Cases Data Enrichment: Feed company names or URLs from your CRM and get back structured firmographic data (industry, funding, team size, tech stack). Lead Generation: Ask the agent to find pricing, contact pages, or product details for a list of competitors. Market Research: Extract structured pricing plans, feature comparisons, or product catalogs from any website. Content Aggregation: Pull structured news, events, or job postings from across the web on a schedule. Sales Intelligence: Enrich prospect lists with company info, recent news, or tech stack details before outreach. How It Works `` POST /webhook/scrape-agent ` 1. Receive Scrape Request receives a POST request with prompt and an optional output_schema. 2. Validate Output Schema checks the schema. If none is provided, it falls back to a permissive default. If the schema is malformed, it returns a clear error via Return Schema Error. 3. Research & Extract Web Data takes the prompt and uses the full Firecrawl toolkit to research the web: Search (/search): Finds relevant pages and sources across the web. Scrape (/scrape): Extracts clean, structured content from any URL. Interact (interactContext, interact, interactStop): Lets the agent interact with scraped pages in a live session. After scraping a page, the agent can click buttons, fill forms, navigate dynamic content, and extract data that static scraping cannot reach, all without managing sessions manually. This combination gives the AI agent complete web navigation capabilities. It can discover sources, read pages, and interact with dynamic content autonomously. 4. Format Response to Schema (Structured Output Parser) formats the agent's response to match the provided (or default) schema. 5. Return Structured Results sends the structured JSON back to the caller. Setup Requirements Firecrawl API Key: Sign up at firecrawl.dev and grab your API key. Connect it in the Firecrawl credential nodes. LLM Provider: Configure your Primary Chat Model and Fallback Chat Model nodes (e.g., OpenRouter, OpenAI, Anthropic). The template uses two model nodes for reliability, plus a separate Parser Chat Model for the output parser. n8n Instance: Self-hosted or cloud. Make sure the webhook node is set to accept POST requests. API Reference Endpoint ` POST https://your-n8n-instance/webhook/scrape-agent ` Request Body | Field | Type | Required | Description | |-------|------|----------|-------------| | prompt | string | Yes | Natural language instruction for the agent | | output_schema | object | No | JSON Schema defining the desired output structure | Response Returns a JSON object matching the provided schema, or a flexible object if no schema was given. --- Testing Examples 1. Basic Request (No Schema) The agent decides the output structure on its own. `bash curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl" }' | jq ` Expected output: A JSON object with whatever structure the agent finds most appropriate for the data. Since no schema was provided, the internal default ({ "type": "object", "additionalProperties": true }) is used. 2. Request With a Custom Schema You define exactly the shape of data you want back. `bash curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl", "output_schema": { "type": "object", "properties": { "source": { "type": "string" }, "plans": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "price": { "type": "string" }, "credits": { "type": "string" }, "highlights": { "type": "array", "items": { "type": "string" } } } } } } } }' | jq ` Expected output: `json { "output": { "source": "https://www.firecrawl.dev/pricing", "plans": [ { "name": "Free", "price": "$0 (one-time)", "credits": "500 credits (one-time)", "highlights": [ "Scrape up to 500 pages", "2 concurrent requests", "Low rate limits", "No credit card required" ] }, { "name": "Hobby", "price": "$16/month (billed yearly, save $38)", "credits": "3,000 credits / month", "highlights": [ "Scrape up to 3,000 pages", "5 concurrent requests", "Basic support", "$9 per extra 1k credits" ] } ] } } ` 3. Invalid Schema (String Instead of Object) `bash curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl", "output_schema": "not a valid schema" }' | jq ` Expected output: `json { "error": true, "message": "Invalid output_schema: must be a JSON object with a valid 'type' property (object, array, string, number, boolean)", "example_schema": { "type": "object", "properties": { "name": { "type": "string" }, "price": { "type": "number" } } } } ` 4. Invalid Schema (Array Instead of Object) `bash curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl", "output_schema": [1, 2, 3] }' | jq ` Expected output: Same error response as above. 5. Invalid Schema (Missing type Property) `bash curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl", "output_schema": { "properties": { "name": { "type": "string" } } } }' | jq ` Expected output: Same error response as above. 6. Invalid Schema (Invalid type Value) `bash curl -X POST "https://your-n8n-instance/webhook/scrape-agent" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Find the latest pricing for Firecrawl", "output_schema": { "type": "banana" } }' | jq ` Expected output: Same error response as above. --- Workflow Architecture ` Receive Scrape Request (POST) | v Validate Output Schema |--- Error --> Return Schema Error (error JSON) |--- Success --> Research & Extract Web Data (AI Agent) | |--- Primary Chat Model |--- Fallback Chat Model |--- Search & Scrape: | - /search with Firecrawl | - /scrape with Firecrawl |--- Interact Tool: | - Interact context with Firecrawl | - Execute interaction with Firecrawl | - Stop interaction with Firecrawl | v Return Structured Results | |--- Format Response to Schema (Output Parser) | |--- Parser Chat Model ` Schema Validation Logic The Validate Output Schema node runs this validation before passing data to the agent: If output_schema is missing or null, the default permissive schema is used: { "type": "object", "additionalProperties": true }. If output_schema is present, it must be a JSON object (not a string, array, or primitive). It must have a type property with a valid value: object, array, string, number, or boolean. If validation fails, the workflow returns an error response with a helpful message and example schema. Notes The Format Response to Schema node (Structured Output Parser) requires the schema to be passed as a JSON string. The expression {{ JSON.stringify($('Validate Output Schema').item.json.output_schema) }}` handles this conversion. The agent has access to Firecrawl's full toolkit: search, scrape, and interact. With all three connected, the agent has complete web navigation powers. It can discover sources via search, extract content via scrape, and interact with dynamic JavaScript-heavy pages via interact. The interact tools let the agent scrape a page first and then continue working with it in a live session, clicking buttons, filling forms, and navigating deeper, all without manual session management. The agent autonomously decides which tools to use based on the prompt. Response times vary depending on the complexity of the prompt and how many pages the agent needs to visit. Simple lookups take a few seconds; deep research can take longer.