n8n

How to Automate OpenAI Pinecone Knowledge Search?

Give your users fast answers from technical docs without manual lookup. This build turns long API documents into quick chat answers. It fits teams that support developers, product partners, or internal engineers.

The flow has two parts. First, a manual run pulls a public JSON spec file with an HTTP request, splits the text into small chunks, creates embeddings with OpenAI, and writes them into a Pinecone index. Second, a chat trigger listens for a user message. The AI Agent uses an OpenAI chat model, a vector store tool, and short term memory. It converts the question into an embedding, searches Pinecone for the best matching chunks, and writes a clear reply. Two chat models separate planning and response. The result is a focused RAG chat that stays grounded in source text.

You will need OpenAI and Pinecone accounts and an index named n8n demo or a name you choose. Expect lower support load, faster replies, and fewer escalations to engineers. This setup works well for API portals, internal enablement, and onboarding labs where accurate, sourced answers matter.

What are the key features?

  • Manual trigger pulls the latest spec file with an HTTP request
  • Document loader and text splitter break large text into readable chunks
  • OpenAI embeddings turn each chunk into vectors for search
  • Pinecone vector store saves and indexes the embeddings
  • Chat trigger captures user questions in real time
  • AI Agent uses a system message and window memory for context
  • Vector store tool queries Pinecone using the user embedding
  • Two OpenAI chat models separate tool use and final response

What are the benefits?

  • Reduce answer time from 15 minutes to under 1 minute
  • Automate up to 80 percent of common technical questions
  • Improve accuracy by sourcing replies from the original spec
  • Handle 10 times more chat volume without extra staff
  • Connect data source, AI model, and vector search in one flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with OpenAI, Pinecone and GitHub. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create an OpenAI credential using an API key from your OpenAI account. Name it clearly, then select it in both OpenAI Chat Model nodes and in the embeddings nodes.
  4. In the n8n credentials manager, create a Pinecone credential using your Pinecone API key and environment. Confirm the index name matches your target index such as n8n demo.
  5. Open the Pinecone console and create the index if it does not exist. Choose an appropriate dimension that matches your embedding model. If unsure, use the default for the selected OpenAI embedding model.
  6. Open the HTTP Request node and confirm the URL points to a public JSON file. No credential is needed for a public file. If you plan to pull from a private repo, add a GitHub personal access token in the node.
  7. Review the Recursive Character Text Splitter node and keep default chunk size and overlap to start. Adjust later if you see irrelevant or cut off answers.
  8. Check the Pinecone Vector Store node set to insert mode and confirm it uses your Pinecone credential and the correct index name.
  9. Click Test workflow to run the indexing path. Verify in the Pinecone console that vectors were added to the index.
  10. Open the When chat message received node view and start a test chat. Ask a question about the documented endpoints. Confirm the AI Agent returns sourced details.
  11. If replies are empty, check that the Vector Store Tool connects to the Pinecone Vector Store querying node and that the Generate User Query Embedding node uses your OpenAI credential.
  12. If you see rate limit errors, slow down tests or upgrade your OpenAI or Pinecone plan. If you see index not found, correct the index name in both vector store nodes.
  13. Re run the manual indexing whenever the source file changes to keep the chat answers up to date.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

GitHub

Sign up

Free tier: $0 / mo

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Pinecone

Sign up

Starter (Free): $0 / mo; includes 2 GB storage, 2M write units / mo, 1M read units / mo, up to 5 indexes; API access.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.