AI Agents

Example of a RAG application workflow with Webhook integration

34 nodes 212 117 Webhook
Download

Workflow Description

A retrieval-augmented generation workflow that accepts queries via webhook, processes documents through intelligent text splitting, retrieves relevant content from Qdrant vector database using embeddings, and generates accurate responses with Gemini LLM. Results can be published to X or returned directly to clients.

How it works

  1. 1.Receive incoming request through webhook and store initial data
  2. 2.Load documents and split them into manageable text segments using recursive character splitting
  3. 3.Search vector store in Qdrant and retrieve the most relevant documents
  4. 4.Generate contextual responses using Gemini language model
  5. 5.Deliver results via X integration or direct webhook response

Use cases

  • Intelligent question-answering system powered by company documentation
  • Internal search engine that finds relevant information and explains it naturally
  • API-driven document analysis and data processing pipeline
  • Automated publishing of insights and answers to social media based on queries

Requirements

  • Qdrant vector database server configured with pre-loaded text embeddings
  • Google Cloud Gemini API credentials and valid authentication
  • X platform API credentials for automated posting capability
  • Base documents indexed and stored in the vector database

Service Value

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

Apps Used

Document Default Data Loader Text Splitter Twitter/X Vector Store Embeddings LLM Chain Gemini

Details

Trigger Webhook
Nodes 34
Apps 7
Views 212
Downloads 117

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

/

Bitrix24 Handler

Webhook

#1

Credentials

Set

#2

Validate Token

If

#3

Route Event

Switch

#4

Process Message

Function

#5

Process Join

Function

#6

Process Install

Function

#7

Register Bot

HTTP Request

#8

Send Message

HTTP Request

#9

Send Join Message

HTTP Request

#10

Process Delete

No Op

#11

Success Response

Webhook

#12

Error Response

Webhook

#13

Merge parameters for Subworkflow

Merge

#14

Get a list of available storages

HTTP Request

#15

Get a list of List of Files and Folders

HTTP Request

#16

Get a list of Folders files

HTTP Request

#17

Download file

HTTP Request

#18

Default Data Loader

Document Default Data Loader

#19

Recursive Character Text Splitter

Text Splitter Recursive Character Text Splitter

#20

Split Out folder files and folders

Split Out

#21

Filter for files

Filter

#22

Move files to Vector stored folder

HTTP Request

#23

Execute Workflow Trigger

Execute Workflow Trigger

#24

Sticky Note

Sticky Note

#25

Qdrant Vector Store

Vector Store Qdrant

#26

Embeddings Ollama

Embeddings Ollama

#27

Vector Store Retriever

Retriever Vector Store

#28

Question and Answer Chain

Chain Retrieval Qa

#29

Prepare output parameters

Set

#30

Embeddings Ollama1

Embeddings Ollama

#31

Google Gemini Chat Model

Gemini Model

#32

Qdrant Vector Store1

Vector Store Qdrant

#33

Execute subworkflow

Execute Workflow

#34