n8n

How to Connect Milvus and OpenAI Knowledge Search?

Turn a public article site into a simple research chat. New content is scraped, stored in a vector database, and ready for question and answer with clear citations. Great for teams that need fast insights from long posts without reading everything.

The flow starts with a manual run that collects the article list, pulls the first few pages, removes HTML, and splits text into large chunks. Embeddings are created with OpenAI and loaded into a Milvus collection for fast search. A chat trigger then listens for a question, builds a fresh embedding of the query, fetches the top matches from Milvus, and prepares a short context pack. A language model answers only from that context and returns links as citations. Chunk limits and top results settings control speed and cost.

Setup needs a running Milvus server and an OpenAI API key. You can keep the default collection name or pick your own. Update the CSS selector if your source site layout is different. Expect big time savings for research tasks, faster onboarding for new team members, and clear sources you can trust. Run the load step once, then ask questions anytime through the chat endpoint.

What are the key features?

  • Manual load step scrapes an article index page and extracts links with a CSS selector.
  • Fetches each article and strips HTML to keep only clean text for analysis.
  • Limits ingestion to the first 3 pages to test fast before scaling up.
  • Splits text into chunks of up to 6000 characters for better retrieval.
  • Creates embeddings with OpenAI and stores vectors in a Milvus collection.
  • Chat trigger captures a user question and embeds it for semantic search.
  • Retrieves the top 2 matching chunks from Milvus and caps context to 4 chunks.
  • LLM answers only from provided context and returns citations assembled from the source list.

What are the benefits?

  • Reduce manual reading from 2 hours to 5 minutes by asking focused questions
  • Automate 80% of repetitive copy and paste work during research
  • Improve answer trust with source citations on every response
  • Handle hundreds of long articles without slowing down search
  • Control cost and speed by limiting context to 4 chunks and top 2 matches

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 Milvus and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. Start a Milvus server and create a collection named my_collection. The sticky note inside the canvas explains a simple standalone setup.
  4. In n8n, open the Milvus Vector Store node, choose Credential to connect with, click Create new credential, and follow the on screen steps to enter your Milvus host, port, and collection name.
  5. Create an OpenAI API key in your OpenAI account. In n8n, open each OpenAI node, choose Credential to connect with, click Create new credential, and paste the API key. Name your credentials clearly, like OpenAI Prod.
  6. Review the Fetch Essay List node and confirm the URL points to the article index you want. If you target a different site, adjust the CSS selector in the Extract essay names node.
  7. Check the Limit to first 3 node. Keep it for testing, then raise or remove the limit when you are ready to scale.
  8. Confirm chunk size in the Recursive Character Text Splitter node and collection name in the Milvus nodes. Leave defaults if unsure.
  9. Click Execute Workflow to run the manual load. After it finishes, open your Milvus dashboard or logs to confirm documents were added.
  10. Open the When chat message received node. Use its test interface or copy the webhook URL. Send a question with a chatInput field and verify you get an answer with citations.
  11. If no results return, check that embeddings are created, the Milvus credentials are correct, and that your CSS selector still matches the article links.
  12. If answers feel off, raise topK in the Milvus retrieval node or increase the chunks number in the Set max chunks step. Keep an eye on cost and latency.

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.

Milvus

Sign up

Free plan: $0 / mo; 5 GB storage, 2.5M vCUs / mo, up to 5 collections

OpenAI

Sign up

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

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.