{"record":{"id":"d1be5a3ae7538729","repo":"n8n-io/n8n","slug":"index-index-not-found","errorCode":null,"errorMessage":"Index ${index} not found","messagePattern":"Index (.+?) not found","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.ts","lineNumber":113,"sourceCode":"\t},\n\tasync populateVectorStore(context, embeddings, documents, itemIndex) {\n\t\tconst index = context.getNodeParameter('pineconeIndex', itemIndex, '', {\n\t\t\textractValue: true,\n\t\t}) as string;\n\t\tconst options = context.getNodeParameter('options', itemIndex, {}) as {\n\t\t\tpineconeNamespace?: string;\n\t\t\tclearNamespace?: boolean;\n\t\t};\n\t\tconst credentials = await context.getCredentials('pineconeApi');\n\n\t\tconst client = new Pinecone({\n\t\t\tapiKey: credentials.apiKey as string,\n\t\t});\n\n\t\tconst indexes = ((await client.listIndexes()).indexes ?? []).map((i) => i.name);\n\n\t\tif (!indexes.includes(index)) {\n\t\t\tthrow new NodeOperationError(context.getNode(), `Index ${index} not found`, {\n\t\t\t\titemIndex,\n\t\t\t\tdescription: 'Please check that the index exists in your vector store',\n\t\t\t});\n\t\t}\n\n\t\tconst pineconeIndex = client.Index(index);\n\n\t\tif (options.pineconeNamespace && options.clearNamespace) {\n\t\t\tconst namespace = pineconeIndex.namespace(options.pineconeNamespace);\n\t\t\ttry {\n\t\t\t\tawait namespace.deleteAll();\n\t\t\t} catch (error) {\n\t\t\t\t// Namespace doesn't exist yet\n\t\t\t\tcontext.logger.info(`Namespace ${options.pineconeNamespace} does not exist yet`);\n\t\t\t}\n\t\t}\n\n\t\tawait PineconeStore.fromDocuments(documents, embeddings, {","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.ts#L95-L131","documentation":"NodeOperationError (with remediation description) thrown by the Pinecone vector store when the configured index name does not appear in `client.listIndexes()`. The node enumerates the user's Pinecone indexes and refuses to proceed if the selected one is not among them — this prevents a confusing 404 from Pinecone at query time.","triggerScenarios":"Index name typed manually and misspelled; index was deleted in the Pinecone console after the workflow was saved; index is in a different project/region than the API key; index still being created (Pinecone reports `Ready: false`).","commonSituations":"Pinecone free-tier index auto-deleted after inactivity; wrong API key environment selected; region mismatch; index name has different casing (`MyIndex` vs `myindex`).","solutions":["Open the Pinecone console and confirm the index exists and is `Ready`.","Pick the index from the node's dropdown (which calls listIndexes) instead of typing the name.","Verify the API key credential corresponds to the same project that owns the index.","Recreate the index if it was deleted, then re-run."],"exampleFix":"// before\nconst indexes = ((await client.listIndexes()).indexes ?? []).map((i) => i.name);\nif (!indexes.includes(index)) {\n  throw new NodeOperationError(context.getNode(), `Index ${index} not found`, {\n    itemIndex,\n    description: 'Please check that the index exists in your vector store',\n  });\n}\n\n// after: list available indexes and check Ready state\nconst indexList = (await client.listIndexes()).indexes ?? [];\nconst names = indexList.map((i) => i.name);\nif (!names.includes(index)) {\n  throw new NodeOperationError(context.getNode(), `Index ${index} not found`, {\n    itemIndex,\n    description: `Available indexes: ${names.join(', ') || 'none'}. Create the index in Pinecone if missing.`,\n  });\n}\nconst status = indexList.find((i) => i.name === index)?.status;\nif (status?.ready === false) {\n  throw new NodeOperationError(context.getNode(), `Index ${index} is not ready (state: ${status.state})`, { itemIndex });\n}","handlingStrategy":"validation","validationCode":"// Pre-flight: confirm the index exists and is Ready before the workflow runs.\nasync function ensurePineconeIndex(client: Pinecone, name: string): Promise<void> {\n  const list = (await client.listIndexes()).indexes ?? [];\n  const match = list.find((i) => i.name === name);\n  if (!match) throw new Error(`Index ${name} not found. Available: ${list.map((i) => i.name).join(', ')}.`);\n  if (match.status?.ready === false) throw new Error(`Index ${name} not ready (state: ${match.status.state}).`);\n}","typeGuard":"function indexExists(names: string[], target: string): boolean {\n  return names.some((n) => n === target);\n}","tryCatchPattern":"const indexes = ((await client.listIndexes()).indexes ?? []).map((i) => i.name);\nif (!indexExists(indexes, index)) {\n  throw new NodeOperationError(context.getNode(), `Index ${index} not found`, {\n    itemIndex,\n    description: `Available: ${indexes.join(', ') || 'none'}. Create the index in Pinecone if missing.`,\n  });\n}","preventionTips":["Pick the index from the dropdown (which calls listIndexes) rather than typing the name.","Verify the API key belongs to the same project as the index.","Watch for free-tier auto-deletion after long inactivity."],"tags":["pinecone","vector-store","missing-index","configuration","node-operation-error","langchain"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}