AI Agents

Build an intelligent agent that learns from documents and answers user inquiries

38 nodes 329 151 Automatic trigger
Download

Workflow Description

A comprehensive automation that loads documents, segments them, stores content in a vector database, then deploys an AI-powered agent with conversation memory to answer questions based on loaded documents and automatically post responses to X.

How it works

  1. 1.Load documents and extract content using the default data loader for multiple file formats
  2. 2.Split text into smaller chunks and convert them to embedding vectors using Mistral embeddings
  3. 3.Store vectors in Qdrant vector database for fast retrieval and semantic search capabilities
  4. 4.Receive user questions through chat interface and route them to the intelligent agent
  5. 5.Use OpenAI-powered agent with memory to generate accurate answers based on indexed documents
  6. 6.Post generated responses and content to X account automatically for audience engagement

Use cases

  • Create a customer support assistant that answers questions based on your documented knowledge base
  • Automate publishing of insights and summaries to social media directly from your documents
  • Build a technical support system that learns from internal documentation and provides instant guidance

Requirements

  • Documents in supported formats (PDF, Word, text files) ready for loading and analysis
  • Active OpenAI API account with appropriate credits for agent processing and language understanding
  • Configured Qdrant instance with a vector database ready to store embedded content
  • Twitter/X account with API access credentials enabled for automated posting
  • Relevant technical or business documents to train the agent on your domain knowledge

Service Value

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

Apps Used

Embeddings Document Default Data Loader Text Splitter Twitter/X Split In Batches Vector Store AI Agent Memory Chat Trigger OpenAI Tool

Details

Trigger Automatic trigger
Nodes 38
Apps 11
Views 329
Downloads 151

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 (38)

/

When clicking ‘Test workflow’

Manual Trigger

#1

Embeddings Mistral Cloud

Embeddings Mistral Cloud

#2

Default Data Loader

Document Default Data Loader

#3

Recursive Character Text Splitter

Text Splitter Recursive Character Text Splitter

#4

Get Tax Code Zip File

HTTP Request

#5

Extract Zip Files

Compression

#6

Files as Items

Split Out

#7

Extract PDF Contents

Extract From File

#8

Extract From Chapter

Set

#9

Map To Sections

Set

#10

Execute Workflow Trigger

Execute Workflow Trigger

#11

Get Mistral Embeddings

HTTP Request

#12

Content Chunking @ 50k Chars

Set

#13

Split Out Chunks

Split Out

#14

For Each Section...

Split In Batches

#15

Sections To List

Split Out

#16

Only Valid Sections

Filter

#17

Use Qdrant Search API1

HTTP Request

#18

Use Qdrant Scroll API

HTTP Request

#19

Get Search Response

Set

#20

Sticky Note

Sticky Note

#21

Sticky Note1

Sticky Note

#22

Sticky Note2

Sticky Note

#23

Qdrant Vector Store

Vector Store Qdrant

#24

Sticky Note3

Sticky Note

#25

Sticky Note4

Sticky Note

#26

AI Agent

Agent

#27

Window Buffer Memory

Memory Buffer Window

#28

When chat message received

Chat Trigger

#29

Window Buffer Memory1

Memory Buffer Window

#30

OpenAI Chat Model

OpenAI

#31

1sec

Wait

#32

Ask Tool

Tool Workflow

#33

Search Tool

Tool Workflow

#34

Switch

Switch

#35

Get Ask Response

Set

#36

Sticky Note5

Sticky Note

#37

Sticky Note6

Sticky Note

#38