From 664c742a99d96ffd56c784ae1fd6e55bea2e32b0 Mon Sep 17 00:00:00 2001 From: nusquama Date: Tue, 25 Nov 2025 10:37:50 +0100 Subject: [PATCH] creation --- ...s_from_pdf_documents_using_rag_google_drive_and_pinecone.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 workflows/Answer WhatsApp Questions from PDF Documents using RAG, Google Drive and Pinecone-10980/answer_whatsapp_questions_from_pdf_documents_using_rag_google_drive_and_pinecone.json diff --git a/workflows/Answer WhatsApp Questions from PDF Documents using RAG, Google Drive and Pinecone-10980/answer_whatsapp_questions_from_pdf_documents_using_rag_google_drive_and_pinecone.json b/workflows/Answer WhatsApp Questions from PDF Documents using RAG, Google Drive and Pinecone-10980/answer_whatsapp_questions_from_pdf_documents_using_rag_google_drive_and_pinecone.json new file mode 100644 index 000000000..5438b8dd9 --- /dev/null +++ b/workflows/Answer WhatsApp Questions from PDF Documents using RAG, Google Drive and Pinecone-10980/answer_whatsapp_questions_from_pdf_documents_using_rag_google_drive_and_pinecone.json @@ -0,0 +1 @@ +{"meta":{"instanceId":"2083038fbc253b4180eadb9a1e5ddf461c6f5eebcbb33388217161be06e63baf","templateCredsSetupCompleted":true},"nodes":[{"id":"08545593-4695-4026-ba55-d1d58a01fbf6","name":"Google Drive Trigger","type":"n8n-nodes-base.googleDriveTrigger","position":[640,-800],"parameters":{"pollTimes":{"item":[{"mode":"everyMinute"}]},"triggerOn":"specificFile","fileToWatch":{"__rl":true,"mode":"list","value":"1qz6aQrwo6LyWhPLlij-v0RZE4DtZe85L","cachedResultUrl":"https://drive.google.com/file/d/1qz6aQrwo6LyWhPLlij-v0RZE4DtZe85L/view?usp=drivesdk","cachedResultName":"restaurant_full_rag_dataset.pdf"}},"credentials":{"googleDriveOAuth2Api":{"id":"D8kCvfmn96wky0iD","name":"Google Drive Sam"}},"typeVersion":1},{"id":"cd8f31f5-dd48-40f0-9138-2a4924709eab","name":"Download file","type":"n8n-nodes-base.googleDrive","position":[848,-800],"parameters":{"fileId":{"__rl":true,"mode":"id","value":"={{ $json.id }}"},"options":{},"operation":"download"},"credentials":{"googleDriveOAuth2Api":{"id":"D8kCvfmn96wky0iD","name":"Google Drive Sam"}},"typeVersion":3},{"id":"6214c5d2-8cfe-45c7-b0b1-95323120bb24","name":"Pinecone Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStorePinecone","position":[1072,-800],"parameters":{"mode":"insert","options":{},"pineconeIndex":{"__rl":true,"mode":"list","value":"restaurant","cachedResultName":"restaurant"}},"credentials":{"pineconeApi":{"id":"C3czn0Uhlx6S7o92","name":"PineconeApi Sam"}},"typeVersion":1.3},{"id":"0982afed-4193-4c5d-aa98-a9df27d2113f","name":"Embeddings OpenAI","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[1968,-416],"parameters":{"options":{"dimensions":512}},"credentials":{"openAiApi":{"id":"urbtrva7Pu5dKh9S","name":"OpenAi Chaaabi"}},"typeVersion":1.2},{"id":"4aaa3a79-ef9d-4a61-ad29-dbde97b2d61d","name":"Default Data Loader","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","position":[1040,-640],"parameters":{"options":{"metadata":{"metadataValues":[{"name":"file-name","value":"={{ $('Download file').item.json.name }}"}]}},"dataType":"binary","textSplittingMode":"custom"},"typeVersion":1.1},{"id":"e832710a-38fa-4251-8fca-24ab3e4dc5c7","name":"Recursive Character Text Splitter1","type":"@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","position":[1040,-496],"parameters":{"options":{},"chunkSize":100,"chunkOverlap":20},"typeVersion":1},{"id":"500adcb8-c88f-42ce-a304-b56af4ef9051","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","disabled":true,"position":[1488,-704],"webhookId":"b92db93d-19a2-467a-b4e9-eb438a10ce8d","parameters":{"options":{}},"typeVersion":1.3},{"id":"ce938ad4-cc83-4435-b23f-8c06adf845dc","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[1776,-800],"parameters":{"text":"=User : {{ $json.messages[0].text.body }}","options":{"systemMessage":"You are a friendly assistant. When a question comes in, use only the information retrieved from the vector database to answer. Speak casually and naturally, like a real person helping a customer. Keep replies short, clear, and to the point. If something isn’t in the retrieved context, just say you’re not sure instead of guessing. Do not make up details."},"promptType":"define"},"typeVersion":2.2},{"id":"7effc941-5403-4b4d-9ac3-41255c845179","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[1712,-576],"parameters":{"options":{}},"credentials":{"googlePalmApi":{"id":"bPXpM3TIhIltSRHF","name":"Google Gemini(PaLM) Api account-Neer_Sam"}},"typeVersion":1},{"id":"e6d9c355-971f-49a0-9bd5-d849639a7684","name":"Pinecone Vector Store1","type":"@n8n/n8n-nodes-langchain.vectorStorePinecone","position":[1968,-576],"parameters":{"mode":"retrieve-as-tool","topK":5,"options":{},"pineconeIndex":{"__rl":true,"mode":"list","value":"restaurant","cachedResultName":"restaurant"},"toolDescription":"Stores restaurant menu, dish, order, customer and info embeddings for fast semantic retrieval to support RAG-based restaurant queries."},"credentials":{"pineconeApi":{"id":"C3czn0Uhlx6S7o92","name":"PineconeApi Sam"}},"typeVersion":1.3},{"id":"33a196f5-8a72-4b63-af9d-ff8a08a09db1","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[1840,-576],"parameters":{"sessionKey":"1","sessionIdType":"customKey"},"typeVersion":1.3},{"id":"d88601d1-f83c-46ea-9ab3-c5158d1aeb89","name":"Embeddings OpenAI1","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[1184,-496],"parameters":{"options":{"dimensions":512}},"credentials":{"openAiApi":{"id":"urbtrva7Pu5dKh9S","name":"OpenAi Chaaabi"}},"typeVersion":1.2},{"id":"b5f80994-429a-4685-95d6-6ff3d9c45758","name":"Send message","type":"n8n-nodes-base.whatsApp","position":[2128,-800],"webhookId":"a7a75e44-4ecc-4fec-8d69-4b57ca51640c","parameters":{"textBody":"={{ $json.output }}","operation":"send","phoneNumberId":"Enter sender phone number id","additionalFields":{},"recipientPhoneNumber":"={{ $('WhatsApp Trigger').item.json.messages[0].from }}"},"credentials":{"whatsAppApi":{"id":"72jehMbb8oIbjAHT","name":"WhatsApp account 2"}},"typeVersion":1},{"id":"ac8f0ef7-5a1e-4642-8d5f-c078ffe25fd6","name":"WhatsApp Trigger","type":"n8n-nodes-base.whatsAppTrigger","position":[1488,-896],"webhookId":"4fd6459a-6f3d-4ee4-aa38-432f412ad9b8","parameters":{"options":{},"updates":["messages"]},"credentials":{"whatsAppTriggerApi":{"id":"KQoVZyD3Waoo0X5y","name":"WhatsApp_Sam"}},"typeVersion":1},{"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 and stores them inside a Pinecone Database. This prepares your knowledge base.\n\nStep 2 -\nlistens for incoming WhatsApp messages. When someone sends a message, the AI Agent fetches relevant context from Pinecone and uses the selected model to generate a helpful response. The final answer is then sent back to the user through WhatsApp.\n\n\n## Setup Steps\n\n-Connect Google Drive and select your source folder.\n-Add your Pinecone API key + index name.\n-Add your OpenAI API key for embeddings.\n-Connect your WhatsApp trigger and sender nodes.\n-Configure the AI Agent with your model.\n-Upload a test document and send a WhatsApp message to verify."},"typeVersion":1},{"id":"7f411f6a-5cb7-4355-9e4f-73ec9e6fce9c","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[736,-960],"parameters":{"color":7,"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."},"typeVersion":1},{"id":"c6e8cacf-86e2-4e64-ac79-e4426a2620f4","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1680,-992],"parameters":{"color":7,"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."},"typeVersion":1},{"id":"aeeb9736-3cf6-4464-819d-bd602db85a65","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[2128,-448],"parameters":{"color":7,"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."},"typeVersion":1}],"pinData":{},"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}]]}}} \ No newline at end of file