{
  "name": "Answer WhatsApp questions from PDF documents using RAG, Google Drive and Pinecone",
  "nodes": [
    {
      "id": "08545593-4695-4026-ba55-d1d58a01fbf6",
      "name": "Google Drive Trigger",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        640,
        -800
      ]
    },
    {
      "id": "cd8f31f5-dd48-40f0-9138-2a4924709eab",
      "name": "Download file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        848,
        -800
      ]
    },
    {
      "id": "6214c5d2-8cfe-45c7-b0b1-95323120bb24",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        1072,
        -800
      ]
    },
    {
      "id": "0982afed-4193-4c5d-aa98-a9df27d2113f",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1968,
        -416
      ]
    },
    {
      "id": "4aaa3a79-ef9d-4a61-ad29-dbde97b2d61d",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1040,
        -640
      ]
    },
    {
      "id": "e832710a-38fa-4251-8fca-24ab3e4dc5c7",
      "name": "Recursive Character Text Splitter1",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        1040,
        -496
      ]
    },
    {
      "id": "500adcb8-c88f-42ce-a304-b56af4ef9051",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        1488,
        -704
      ]
    },
    {
      "id": "ce938ad4-cc83-4435-b23f-8c06adf845dc",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1776,
        -800
      ]
    },
    {
      "id": "7effc941-5403-4b4d-9ac3-41255c845179",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1712,
        -576
      ]
    },
    {
      "id": "e6d9c355-971f-49a0-9bd5-d849639a7684",
      "name": "Pinecone Vector Store1",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        1968,
        -576
      ]
    },
    {
      "id": "33a196f5-8a72-4b63-af9d-ff8a08a09db1",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1840,
        -576
      ]
    },
    {
      "id": "d88601d1-f83c-46ea-9ab3-c5158d1aeb89",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1184,
        -496
      ]
    },
    {
      "id": "b5f80994-429a-4685-95d6-6ff3d9c45758",
      "name": "Send message",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2128,
        -800
      ]
    },
    {
      "id": "ac8f0ef7-5a1e-4642-8d5f-c078ffe25fd6",
      "name": "WhatsApp Trigger",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        1488,
        -896
      ]
    },
    {
      "id": "6e720df6-9ff0-4737-8700-e02919461fe2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        -1424
      ],
      "parameters": {
        "width": 480,
        "height": 528,
        "content": "## How it Works\nThis workflow creates a RAG-based WhatsApp chatbot using your own documents.\n\nStep 1 -\nautomatically processes documents you upload to a Google Drive folder and generates embeddings an"
      }
    },
    {
      "id": "7f411f6a-5cb7-4355-9e4f-73ec9e6fce9c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -960
      ],
      "parameters": {
        "width": 512,
        "height": 96,
        "content": "### Document Processing & Embeddings\nProcesses uploaded Drive files, splits text into chunks, creates embeddings with OpenAI, and stores them in the Pinecone vector index."
      }
    },
    {
      "id": "c6e8cacf-86e2-4e64-ac79-e4426a2620f4",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -992
      ],
      "parameters": {
        "width": 432,
        "height": 96,
        "content": "### WhatsApp Message Flow\nReceives incoming WhatsApp messages, sends the query to the AI Agent, and returns the generated answer to the user."
      }
    },
    {
      "id": "aeeb9736-3cf6-4464-819d-bd602db85a65",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2128,
        -448
      ],
      "parameters": {
        "width": 448,
        "height": 96,
        "content": "### AI Retrieval & Response Logic\nThe AI Agent retrieves relevant vectors from Pinecone and uses them as context to generate accurate answers through RAG."
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter1": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  }
}