AI Agents

Insert and retrieve documents with AI-powered search

25 nodes 279 147 Automatic trigger
Download

Workflow Description

Automation that accepts documents via manual trigger or HTTP request, splits them into text chunks, converts them to OpenAI embeddings, stores them in Milvus vector database, then retrieves relevant sections for accurate AI-powered answers using language models.

How it works

  1. 1.Receive documents through manual trigger or HTTP endpoint
  2. 2.Split documents into smaller text chunks using recursive character splitting
  3. 3.Convert each chunk into numerical vectors via OpenAI embeddings
  4. 4.Store vectors and original text in Milvus vector database
  5. 5.Retrieve most relevant chunks when a question is submitted
  6. 6.Generate answers using OpenAI language model based on retrieved context

Use cases

  • Build an intelligent search engine for internal company documents
  • Create a question-answering system based on organizational knowledge base
  • Analyze PDF files or HTML content and extract specific information on demand
  • Develop an AI assistant that answers employee queries from stored documents

Requirements

  • Valid OpenAI API key
  • Access to Milvus vector database server or local instance
  • Manual trigger or HTTP endpoint configured to receive documents
  • Full access permissions in n8n platform

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

Text Splitter Twitter/X OpenAI Chat Trigger Vector Store Document Default Data Loader

Details

Trigger Automatic trigger
Nodes 25
Apps 6
Views 279
Downloads 147

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (25)

/

When clicking "Execute Workflow"

Manual Trigger

#1

Fetch Essay List

HTTP Request

#2

Extract essay names

HTML Page

#3

Split out into items

Split Out

#4

Fetch essay texts

HTTP Request

#5

Limit to first 3

Limit

#6

Extract Text Only

HTML Page

#7

Sticky Note3

Sticky Note

#8

Sticky Note5

Sticky Note

#9

Recursive Character Text Splitter1

Text Splitter Recursive Character Text Splitter

#10

Generate response

Set

#11

Compose citations

Set

#12

Answer the query based on chunks

Information Extractor

#13

Prepare chunks

Code

#14

Set max chunks to send to model

Set

#15

Embeddings OpenAI2

OpenAI

#16

When chat message received

Chat Trigger

#17

Sticky Note1

Sticky Note

#18

Milvus Vector Store in retrieval

Vector Store Milvus

#19

Milvus Vector Store

Vector Store Milvus

#20

Sticky Note

Sticky Note

#21

Sticky Note2

Sticky Note

#22

Embeddings OpenAI

OpenAI

#23

Default Data Loader

Document Default Data Loader

#24

OpenAI Chat Model

OpenAI

#25