Workflow: database-quickstart
Integrations: httpRequest, manualTrigger, set, splitOut, stickyNote

{"nodes": [{"parameters": {"mode": "insert", "pineconeIndex": {"__rl": true, "value": "n8n-dense-index", "mode": "list", "cachedResultName": "n8n-dense-index"}, "options": {}}, "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone", "typeVersion": 1.3, "position": [224, 0], "id": "163c0a37-427c-4da7-a194-203ac216c88e", "name": "Pinecone Vector Store", "credentials": {"pineconeApi": {"id": "pBm0ARHJdLXfTUXe", "name": "Pinecone"}}}, {"parameters": {"options": {"dimensions": 1536}}, "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi", "typeVersion": 1.2, "position": [336, 608], "id": "a034bcb9-d813-4fd0-a68a-426c1f2b2aba", "name": "Embeddings OpenAI", "credentials": {"openAiApi": {"id": "gv5VN25jRLU7YkML", "name": "OpenAI"}}}, {"parameters": {"options": {}}, "type": "@n8n/n8n-nodes-langchain.chatTrigger", "typeVersion": 1.3, "position": [-512, 896], "id": "56182cf7-2bda-4513-a2f9-18fb70c718ec", "name": "When chat message received", "webhookId": "30328376-a9e3-4f11-b1eb-2bbaadbea688"}, {"parameters": {"options": {"systemMessage": "You are a helpful assistant. Only use the Pinecone Vector Store Tool to retrieve data about Pinecone releases. Include the file name and file url in citations wherever referenced in output."}}, "type": "@n8n/n8n-nodes-langchain.agent", "typeVersion": 2.2, "position": [-336, 896], "id": "36bb8361-edfd-47ff-aaf1-48f3c31fb1f7", "name": "AI Agent"}, {"parameters": {"model": {"__rl": true, "value": "gpt-4.1-mini", "mode": "list", "cachedResultName": "gpt-4.1-mini"}, "options": {}}, "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "typeVersion": 1.2, "position": [-336, 1200], "id": "22d00f25-44eb-40c1-8dae-b757e4b66690", "name": "OpenAI Chat Model", "credentials": {"openAiApi": {"id": "gv5VN25jRLU7YkML", "name": "OpenAI"}}}, {"parameters": {"mode": "retrieve-as-tool", "toolDescription": "Contains data about Pinecone releases.", "pineconeIndex": {"__rl": true, "value": "n8n-dense-index", "mode": "list", "cachedResultName": "n8n-dense-index"}, "topK": 20, "options": {}}, "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone", "typeVersion": 1.3, "position": [-16, 1104], "id": "15c599b7-93bb-44b7-b95c-190200de2a20", "name": "Pinecone Vector Store Tool", "credentials": {"pineconeApi": {"id": "pBm0ARHJdLXfTUXe", "name": "Pinecone"}}}, {"parameters": {"content": "![Pinecone logo](https://www.pinecone.io/images/pinecone-logo-for-n8n-templates.png)\n\n\n## Try it out\n\nThis n8n workflow template lets you chat with Pinecone release notes files downloaded via HTTP using OpenAI and Pinecone vector database. It retrieves relevant context from your data in a Pinecone index in real time so you can get accurate, context-aware answers about your proprietary data\u2014without the need to train your own LLM.\n\n#### What is Pinecone vector database?\n[Pinecone vector database](https://docs.pinecone.io/guides/get-started/overview) indexes and stores vector embeddings for fast retrieval and searching for semantically similar data (semantic search over a dense index) or matching words or phrases (lexical or keyword search over a sparse index), or both (over a hybrid index). This template uses a dense Pinecone index for semantic search.\n\n#### Not interested in chunking and embedding your own data or figuring out which search method to use?\n\nTry our n8n quickstart for Pinecone Assistant [here](https://docs.pinecone.io/guides/assistant/quickstart#n8n) or check out the full workflow to chat with your Google Drive documents [here](https://n8n.io/workflows/9942-rag-powered-document-chat-with-google-drive-openai-and-pinecone-assistant/).\n\n### Prerequisites\n* A [Pinecone account](https://app.pinecone.io/) and [API key](https://app.pinecone.io/organizations/-/projects/-/keys)\n* An [Open AI account](https://auth.openai.com/create-account) and [API key](https://platform.openai.com/settings/organization/api-keys)\n\n### Setup\n1. Create a Pinecone index in the Pinecone Console [here](https://app.pinecone.io/organizations/-/projects/-/indexes) \n\t1. Name your index `n8n-dense-index`\n\t2. Select OpenAI's `text-embedding-3-small`\n\t3. Set the Dimension to `1536`\n\t4. Leave everything else as default\n\t5. If you use a different index name, update the related nodes to reflect this change\n2. Setup Pinecone API key credential in n8n\n\t1. In the Pinecone Vector Store node -> Credential to connect with, select Create new credential\n\t2. Paste in your Pinecone API key in the API Key field\n\t3. Name this credential  `Pinecone` so that other nodes reference it\n3. Setup the Open AI credential in n8n\n\t1. In the OpenAI Chat Model node -> Credential to connect with, select Create new credential\n\t2. Set the API Key field to your OpenAI API key\n4. Activate the workflow or test it with a manual execution to ingest the documents\n5. Chat with the Pinecone release notes!\n\n### Ideas for customizing this workflow\n- Use your own data\n\t- Change the urls in Set file urls node to use your own files.\n\t- You may need to adjust the chunk sizes in the Recursive Character Text Splitter node or use a different chunking strategy. You want chunks that are big enough to contain meaningful information but not so big that the meaning is diluted or it can't fit within the context window of the embedding model. Refer to our [article about chunking strategies](https://www.pinecone.io/learn/chunking-strategies/) for more info.\n\t- Customize the System Message of the AI Agent node to reflect what the Pinecone Vector Store Tool will be used for. Be sure to include info on what data can be retrieved using that tool.\n\t- Customize the Description of the Pinecone Vector Store Tool to reflect what data you are storing in the Pinecone index.\n- Use n8n, Pinecone Assistant, and OpenAI to [chat with your Google Drive documents](https://n8n.io/workflows/9942-rag-powered-document-chat-with-google-drive-openai-and-pinecone-assistant/).\n\n### Need help?\nYou can find help by asking in the [Pinecone Discord community](https://discord.gg/tJ8V62S3sH), asking on the [Pinecone Forum](https://community.pinecone.io/), or [filing an issue](https://github.com/pinecone-io/n8n-templates/issues/new/choose) on this repo.", "height": 1504, "width": 636}, "id": "10dd086a-1e30-4dd6-b579-f20336679209", "name": "Sticky Note7", "type": "n8n-nodes-base.stickyNote", "position": [-1424, -128], "typeVersion": 1}, {"parameters": {"content": "## 1. Process new files, embed, and upsert to Pinecone index", "height": 576, "width": 1744, "color": 7}, "type": "n8n-nodes-base.stickyNote", "position": [-608, -80], "typeVersion": 1, "id": "18f22d77-fb10-4fa7-b942-2fafd7ca30c3", "name": "Sticky Note"}, {"parameters": {"content": "## 2. Chat with your docs", "height": 640, "width": 1744, "color": 7}, "type": "n8n-nodes-base.stickyNote", "position": [-608, 784], "typeVersion": 1, "id": "7b7be380-821c-4012-8f1a-1606527d2544", "name": "Sticky Note1"}, {"parameters": {}, "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [-512, 0], "id": "a0a3b917-765b-445e-9866-d3fc651ef6a8", "name": "When clicking \u2018Execute workflow\u2019"}, {"parameters": {"assignments": {"assignments": [{"id": "d0e724df-685f-4661-b2ec-3cdd3c2ba0f1", "name": "urls", "value": "[\"https://docs.pinecone.io/release-notes/2025.md\", \"https://docs.pinecone.io/release-notes/2024.md\", \"https://docs.pinecone.io/release-notes/2023.md\", \"https://docs.pinecone.io/release-notes/2022.md\"]", "type": "array"}]}, "options": {}}, "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [-352, 0], "id": "651439de-5525-4d0a-b055-1d722e81c0aa", "name": "Set file urls"}, {"parameters": {"fieldToSplitOut": "urls", "options": {}}, "type": "n8n-nodes-base.splitOut", "typeVersion": 1, "position": [-192, 0], "id": "8878265e-9e6f-4d9a-b533-53100205eb38", "name": "Split to list"}, {"parameters": {"chunkSize": 3000, "chunkOverlap": 500, "options": {}}, "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter", "typeVersion": 1, "position": [416, 352], "id": "347ba65b-9fad-4b92-a90f-6690df8e2a7e", "name": "Recursive Character Text Splitter"}, {"parameters": {"url": "={{ $json.urls }}", "options": {"response": {"response": {"responseFormat": "file"}}}}, "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [-32, 0], "id": "edf963af-18ee-4605-9b1e-49118c56b52d", "name": "Download file"}, {"parameters": {"dataType": "binary", "textSplittingMode": "custom", "options": {"metadata": {"metadataValues": [{"name": "external_file_url", "value": "={{ $json.urls }}"}]}}}, "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader", "typeVersion": 1.1, "position": [336, 192], "id": "e9b99301-3af1-4d19-ab78-3fd0e8946fd1", "name": "Default data loader"}], "connections": {"Embeddings OpenAI": {"ai_embedding": [[{"node": "Pinecone Vector Store", "type": "ai_embedding", "index": 0}, {"node": "Pinecone Vector Store Tool", "type": "ai_embedding", "index": 0}]]}, "When chat message received": {"main": [[{"node": "AI Agent", "type": "main", "index": 0}]]}, "OpenAI Chat Model": {"ai_languageModel": [[{"node": "AI Agent", "type": "ai_languageModel", "index": 0}]]}, "Pinecone Vector Store Tool": {"ai_tool": [[{"node": "AI Agent", "type": "ai_tool", "index": 0}]]}, "When clicking \u2018Execute workflow\u2019": {"main": [[{"node": "Set file urls", "type": "main", "index": 0}]]}, "Set file urls": {"main": [[{"node": "Split to list", "type": "main", "index": 0}]]}, "Split to list": {"main": [[{"node": "Download file", "type": "main", "index": 0}]]}, "Recursive Character Text Splitter": {"ai_textSplitter": [[{"node": "Default data loader", "type": "ai_textSplitter", "index": 0}]]}, "Download file": {"main": [[{"node": "Pinecone Vector Store", "type": "main", "index": 0}]]}, "Default data loader": {"ai_document": [[{"node": "Pinecone Vector Store", "type": "ai_document", "index": 0}]]}}, "pinData": {}, "meta": {"templateCredsSetupCompleted": true, "instanceId": "6ae6d27e57788e6797af2bf16734f2cac83ad4b8f8ebbf57445f55ef5d3a52da"}}