Erstellung eines KI-gesteuerten WhatsApp-Bots mit Google Drive und Pinecone-Vektordatenbank
Dies ist ein Support, AI-Bereich Automatisierungsworkflow mit 23 Nodes. Hauptsächlich werden If, Set, Code, Webhook, GoogleDrive und andere Nodes verwendet, kombiniert mit KI-Technologie für intelligente Automatisierung. Erstelle einen KI-angetriebenen WhatsApp-Bot mit Google Drive und Pinecone-Vektordatenbank
- •HTTP Webhook-Endpunkt (wird von n8n automatisch generiert)
- •Google Drive API-Anmeldedaten
- •OpenAI API Key
- •Pinecone API Key
Verwendete Nodes (23)
Kategorie
{
"meta": {
"instanceId": "e42ff03bc515cd7f9edc081a89072ca1985132e0d4a1cdabe6c26855a252768f",
"templateId": "1960",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "1f2bb917-6d65-4cfa-9474-fc3b19a8c3bd",
"name": "Notizzettel",
"type": "n8n-nodes-base.stickyNote",
"position": [
60,
200
],
"parameters": {
"color": 7,
"width": 1218,
"height": 627,
"content": "## Load Information from a Google Drive File into a Pinecone Vector Database\nFetch the file from Google Drive, split it into chunks, and insert the chunks into a Pinecone index."
},
"typeVersion": 1
},
{
"id": "ab577f4d-8906-4e0c-bc62-e8a4b2610551",
"name": "Notizzettel 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-500,
260
],
"parameters": {
"width": 480,
"height": 145,
"content": "## Step 1: Connect Your Google Drive \nFollow the instructions in the official n8n docs to set up your Google Drive credentials: \n👉 [Google Drive Credentials Guide](https://docs.n8n.io/integrations/builtin/credentials/google/)"
},
"typeVersion": 1
},
{
"id": "742beb54-8b89-49a3-afe5-fd7e73b37044",
"name": "Standard-Datenlader",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
720,
500
],
"parameters": {
"options": {},
"dataType": "binary"
},
"typeVersion": 1
},
{
"id": "f75e31e9-f752-45d1-bc44-75097ec85ce6",
"name": "Rekursiver Zeichentext-Splitter",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
800,
620
],
"parameters": {
"options": {},
"chunkSize": 3000,
"chunkOverlap": 200
},
"typeVersion": 1
},
{
"id": "bac883c8-4c1f-466b-b20f-d0fdf6acfc42",
"name": "Embeddings OpenAI",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
600,
500
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "wsxLB7on237QOp5h",
"name": "Open AI credentials"
}
},
"typeVersion": 1.2
},
{
"id": "430f667b-9d23-4bb9-b87d-5d9e8ae84df3",
"name": "Einfacher Speicher",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1500,
1180
],
"parameters": {
"sessionKey": "={{ $json.fromNumber }}",
"sessionIdType": "customKey",
"contextWindowLength": 20
},
"typeVersion": 1.3
},
{
"id": "1a2e6717-a220-4f39-8ae9-1921cbff5715",
"name": "OpenAI Chat-Modell",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1260,
1200
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "wsxLB7on237QOp5h",
"name": "Open AI credentials"
}
},
"typeVersion": 1.2
},
{
"id": "7e03e08d-0b61-4054-aa14-8f839d7f0565",
"name": "Frage & Antwort",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1380,
960
],
"parameters": {
"text": "=Sender Name: {{ $json.fromName }}\nMessage: {{ $json.textBody }}",
"options": {
"systemMessage": "=Agent Name: Van\nIdentity:\nYou are a friendly AI agent named Van. You are professional digital sales agent for GrayBox, a company specializing in Structural Insulated Panels (SIP) construction. Van immediately identifies as a digital assistant and exists to serve prospective and current customers of GrayBox with accurate, helpful, and engaging information that supports decision-making and promotes trust.\n\nYour Personality & Style\nTone: Clear, concise, professional—but always friendly and approachable. Talk in first person representing the company.\n\n\nIf user send link don't mention that you cannot read the link. Explain who you are, and ask questions to engage the conversation.. Your goal is to sell our solution. \n\nResponse Style:\n\n\nGreet, answer directly, then offer further help.\nAddress people by their names\n\n\n\nAvoid fluff and unnecessary formalities (unless it's the first message).\n\n\nMaintain consistent use of brand tone: Speed, Quality, Efficiency, Value.\n\n\nBrand Voice Keywords: Speed, Energy Efficiency, Durability, Mold-Free, Earthquake-Resistant, Friendly, Human.\n\n\n\n🔍 Scope of the Agent (What Van Can Do)\nAnswer questions about pricing, materials, SIP benefits, timeline, logistics, and project experience.\n\n\nExplain how GrayBox SIP construction works (in simple, non-technical language).\n\n\nShare relevant visual or catalog links.\n\n\nGuide users to:\n\n\nSchedule a 15-min discovery call: https://calendar.app.google/gJYWhw3LCJBPywGW6\n\n\nVisit projects like Nuanu City or Luna Beach Club.\n\n\nSubmit project materials via form: https://forms.gle/5AddUQbqveFPsTDQ9\nView portfolio: https://graybox.site/graybox-0-0 \n\n🧠 Core Behaviors & Instructions\nAlways say cost starts at 3 million IDR/m² for core and shell.\n\n\nPromote:\n\n\n1-month build time (from materials delivery).\n\n\nCost-effectiveness vs. traditional methods (20–30% cheaper, 4x faster).\n\n\nEnergy savings and safety (mold-free, earthquake-resistant).\n\n\nWhen users upload a file/image: respond with a friendly message and prompt them to fill the quotation form.\n\n\nIf asked about pictures, share: https://graybox.site/graybox-0-0\n\n\nFor meetings or calls: Share this link → https://calendar.app.google/rDzpGdMb3WmGsLFz6\n\n\nFor human contact or visit coordination: Provide Andrea's WhatsApp: +1 650 866 5016\n\n\nIf user says “OK, I’ll visit,” connect directly to Andrea.\n\n\n\n🌍 Contact & Location\nOffice: Uluwatu, Bali – https://maps.app.goo.gl/nT7VDTtLQYSztN7s9\nFactory: Lombok\n\n\nWhatsApp (Andrea): +1 650 866 5016 (only if meeting/human contact requested)\n\n🚀 First-Time Message (Greeting Script)\nDiscover GrayBox: Your dream home starts here!\n We deliver core and shell construction in under a month for developers, builders, and DIY home enthusiasts. Save time and money while enjoying a mold-free, energy-efficient, and earthquake-resistant home. All for just 3 million IDR per m²!\n Build smarter with GrayBox today. \n\nNEVER MAKEUP INFORMATION. \nUSE {{ $json.context }} TO ANSWER QUESTIONS"
},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "56d150ba-9b98-4dbb-9f74-5379344d2257",
"name": "Auf Whatsapp Webhook antworten",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1720,
960
],
"parameters": {
"options": {}
},
"typeVersion": 1.2
},
{
"id": "5d1d4427-bdab-49ef-acbc-084a2d69632f",
"name": "Chunks vorbereiten",
"type": "n8n-nodes-base.code",
"position": [
1200,
960
],
"parameters": {
"jsCode": "let out = \"\"\nfor (const i in $input.all()) {\n let itemText = \"--- CHUNK \" + i + \" ---\\n\"\n itemText += $input.all()[i].json.document.pageContent + \"\\n\"\n itemText += \"\\n\"\n out += itemText\n}\n\nreturn {\n 'context': out,\n 'textBody': $('Listen to Whatsapp webhook').first().json.body.textBody,\n 'fromNumber': $('Listen to Whatsapp webhook').first().json.body.fromNumber,\n 'fromName': $('Listen to Whatsapp webhook').first().json.body.fromName\n};"
},
"typeVersion": 2
},
{
"id": "eba8eaca-915f-4257-901e-c6f56ddf8f0b",
"name": "Top-Chunks zur Abfrage abrufen",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
840,
960
],
"parameters": {
"mode": "load",
"topK": "={{ $json.chunks }}",
"prompt": "={{ $json.body.textBody }}",
"options": {},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "3vansales",
"cachedResultName": "3vansales"
}
},
"credentials": {
"pineconeApi": {
"id": "2ZUBIWHNyYqKmASZ",
"name": "PineconeApi account 2"
}
},
"typeVersion": 1
},
{
"id": "afb0bb4f-8370-4a7a-be3c-8449f5b890d5",
"name": "Maximale Chunks für Modell festlegen",
"type": "n8n-nodes-base.set",
"position": [
620,
960
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "33f4addf-72f3-4618-a6ba-5b762257d723",
"name": "chunks",
"type": "number",
"value": 4
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "d9aa944d-594f-49ad-a40e-123aa42621e3",
"name": "Embeddings OpenAI 2",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
840,
1180
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "wsxLB7on237QOp5h",
"name": "Open AI credentials"
}
},
"typeVersion": 1.2
},
{
"id": "15ff0895-9bb2-47d3-92fb-d0d8d1f4a981",
"name": "Einzel- oder Gruppenmeldungen prüfen",
"type": "n8n-nodes-base.if",
"position": [
340,
980
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "5a946369-3f38-4dcb-b5d9-3d24024d08b0",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.threadType }}",
"rightValue": "individual"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "32df5bff-1b09-4f1c-9344-7d9ae748d917",
"name": "Whatsapp webhook abhören",
"type": "n8n-nodes-base.webhook",
"position": [
120,
980
],
"webhookId": "d1629cd7-6e05-413a-bac0-3c435d4e43b9",
"parameters": {
"path": "d1629cd7-6e05-413a-bac0-3c435d4e43b9",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "8b493fb6-8013-453f-8aa5-1ee9c9d06cd9",
"name": "Notizzettel 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
60,
860
],
"parameters": {
"color": 7,
"width": 2034,
"height": 627,
"content": "### Chat with Your Vector Database Using a Custom WhatsApp Webhook (with Group Support)\nThis workflow takes incoming WhatsApp messages, embeds the content, retrieves relevant chunks from your vector store, and passes them to the model to generate a response."
},
"typeVersion": 1
},
{
"id": "d97920ad-6b36-4981-8b9d-9d470b5c769a",
"name": "Datei von Google Drive herunterladen",
"type": "n8n-nodes-base.googleDrive",
"position": [
360,
280
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "download",
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"id": "10HrAmRHIIsSrT6B",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "0a6f8b88-9c62-4e3e-82cb-a7028bdcac45",
"name": "Pinecone Vector Store indizieren",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
620,
280
],
"parameters": {
"mode": "insert",
"options": {
"clearNamespace": true
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "3vansales",
"cachedResultName": "3vansales"
}
},
"credentials": {
"pineconeApi": {
"id": "2ZUBIWHNyYqKmASZ",
"name": "PineconeApi account 2"
}
},
"typeVersion": 1
},
{
"id": "34f220a8-12d7-480f-9954-11d777359d27",
"name": "Minütlich auf Dateiaktualisierung prüfen",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
140,
280
],
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "specificFile",
"fileToWatch": {
"__rl": true,
"mode": "list",
"value": "1-AZrzOeeZFATUsY-xGD0m_oYkq4ekiSHn3e8Aof9pyU",
"cachedResultUrl": "https://docs.google.com/document/d/1-AZrzOeeZFATUsY-xGD0m_oYkq4ekiSHn3e8Aof9pyU/edit?usp=drivesdk",
"cachedResultName": "Knowladge Base FlatPack"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"id": "10HrAmRHIIsSrT6B",
"name": "Google Drive account"
}
},
"typeVersion": 1
},
{
"id": "f9016922-f6a4-417a-8586-bf0647f1e17b",
"name": "Notizzettel 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-500,
440
],
"parameters": {
"width": 480,
"height": 325,
"content": "## Step 2: Set Up Your Pinecone Vector Database \n1. Log in to your Pinecone account and create an index: \n🚨 Dimensions: 1536\n2. In the workflow, make sure to select this index in **both Pinecone nodes**.\n3. Click \"Test Workflow\" to load your data into the vector database.\n4. Modify the connected document to fit your use case.\n\n**Note:** Once the bot is live, the vector database updates automatically every minute when changes are made. You can customize this update frequency if needed."
},
"typeVersion": 1
},
{
"id": "638760a3-51da-4b88-ace5-73e67e6e6e98",
"name": "Notizzettel 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-500,
800
],
"parameters": {
"color": 2,
"width": 480,
"height": 205,
"content": "## Step 3: Request Access to the Custom WhatsApp Webhook\n1. Fill out this form to request access: \n👉 [Request Access](https://docs.google.com/forms/d/e/1FAIpQLSd-bW5tSJu_rRvJ4NmFrxXSAwaNbO7MbGJtUIS-mBA23B7BWQ/viewform?usp=dialog)\n2. You’ll receive a confirmation message on WhatsApp to verify your connection.\n3. Customize the **AI agent's system prompt** to match your use case."
},
"typeVersion": 1
},
{
"id": "a9092d34-7406-4d7e-8fe4-ce392aae9c5a",
"name": "Notizzettel 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-500,
1040
],
"parameters": {
"color": 2,
"width": 480,
"height": 345,
"content": "## Step 4: Test the WhatsApp Integration\n#### One-on-One Testing\n1. Use a different WhatsApp number to send a message to the connected number.\n2. You should receive a reply from the AI based on:\n ✅ Your system prompt\n ✅ The content in your vector database\n#### Group Testing\n1. Add the bot to a WhatsApp group. \n2. The bot will only reply when tagged or addressed directly, to avoid responding to every message in the group"
},
"typeVersion": 1
},
{
"id": "8b338d65-cd79-41d5-b4c4-e76534d8b19c",
"name": "Notizzettel 6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1160,
260
],
"parameters": {
"width": 480,
"height": 645,
"content": "## 🔑 Key Benefits\n#### 1. No Meta Account Needed\n👉 Works with regular WhatsApp numbers — no Facebook Business setup or official API required.\n\n#### 2. Group Chat Support\n👉 Add the bot to any group. It only replies when tagged to avoid cluttering conversations.\n\n#### 3. Custom AI Responses\n👉 Connect your own documents (via Google Drive + Pinecone) to deliver context-aware replies.\n\n#### 4. Auto-Syncing Knowledge Base\n👉 Updates every minute when your source document changes — always fresh, always relevant.\n\n#### Use cases are endless\n✅ Customer support\n✅ Internal team assistant\n✅ Community group bot\n✅ Personal knowledge brain\n\nAnd so on "
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"430f667b-9d23-4bb9-b87d-5d9e8ae84df3": {
"ai_memory": [
[
{
"node": "7e03e08d-0b61-4054-aa14-8f839d7f0565",
"type": "ai_memory",
"index": 0
}
]
]
},
"5d1d4427-bdab-49ef-acbc-084a2d69632f": {
"main": [
[
{
"node": "7e03e08d-0b61-4054-aa14-8f839d7f0565",
"type": "main",
"index": 0
}
]
]
},
"bac883c8-4c1f-466b-b20f-d0fdf6acfc42": {
"ai_embedding": [
[
{
"node": "0a6f8b88-9c62-4e3e-82cb-a7028bdcac45",
"type": "ai_embedding",
"index": 0
}
]
]
},
"1a2e6717-a220-4f39-8ae9-1921cbff5715": {
"ai_languageModel": [
[
{
"node": "7e03e08d-0b61-4054-aa14-8f839d7f0565",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"7e03e08d-0b61-4054-aa14-8f839d7f0565": {
"main": [
[
{
"node": "56d150ba-9b98-4dbb-9f74-5379344d2257",
"type": "main",
"index": 0
}
]
]
},
"d9aa944d-594f-49ad-a40e-123aa42621e3": {
"ai_embedding": [
[
{
"node": "eba8eaca-915f-4257-901e-c6f56ddf8f0b",
"type": "ai_embedding",
"index": 0
}
]
]
},
"742beb54-8b89-49a3-afe5-fd7e73b37044": {
"ai_document": [
[
{
"node": "0a6f8b88-9c62-4e3e-82cb-a7028bdcac45",
"type": "ai_document",
"index": 0
}
]
]
},
"32df5bff-1b09-4f1c-9344-7d9ae748d917": {
"main": [
[
{
"node": "15ff0895-9bb2-47d3-92fb-d0d8d1f4a981",
"type": "main",
"index": 0
}
]
]
},
"eba8eaca-915f-4257-901e-c6f56ddf8f0b": {
"main": [
[
{
"node": "5d1d4427-bdab-49ef-acbc-084a2d69632f",
"type": "main",
"index": 0
}
]
]
},
"afb0bb4f-8370-4a7a-be3c-8449f5b890d5": {
"main": [
[
{
"node": "eba8eaca-915f-4257-901e-c6f56ddf8f0b",
"type": "main",
"index": 0
}
]
]
},
"f75e31e9-f752-45d1-bc44-75097ec85ce6": {
"ai_textSplitter": [
[
{
"node": "742beb54-8b89-49a3-afe5-fd7e73b37044",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"d97920ad-6b36-4981-8b9d-9d470b5c769a": {
"main": [
[
{
"node": "0a6f8b88-9c62-4e3e-82cb-a7028bdcac45",
"type": "main",
"index": 0
}
]
]
},
"34f220a8-12d7-480f-9954-11d777359d27": {
"main": [
[
{
"node": "d97920ad-6b36-4981-8b9d-9d470b5c769a",
"type": "main",
"index": 0
}
]
]
},
"15ff0895-9bb2-47d3-92fb-d0d8d1f4a981": {
"main": [
[
{
"node": "afb0bb4f-8370-4a7a-be3c-8449f5b890d5",
"type": "main",
"index": 0
}
]
]
}
}
}Wie verwende ich diesen Workflow?
Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.
Für welche Szenarien ist dieser Workflow geeignet?
Experte - Support, Künstliche Intelligenz
Ist es kostenpflichtig?
Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.
Verwandte Workflows
Cecilia
@ceciliaDiesen Workflow teilen