AI Agents

Intelligent Telegram responses using a knowledge base

20 nodes 236 158 Automatic trigger
Download

Workflow Description

An automation that receives messages from a Telegram channel, processes content through AI models, searches a vector knowledge base, and automatically sends smart customized replies to users in real time.

How it works

  1. 1.Receive incoming messages from Telegram using the dedicated trigger
  2. 2.Convert message text to numerical vectors using OpenAI's embedding model
  3. 3.Search the knowledge base stored in Pinecone for relevant answers
  4. 4.Process context and queries through an LLM chain to generate intelligent responses
  5. 5.Send the generated reply back to the user via Telegram

Use cases

  • Automatic answers to frequent customer questions on Telegram
  • Smart customer support using company knowledge bases
  • Advisory bot providing reliable information from predefined documents

Requirements

  • Active Telegram account with Bot API authentication
  • Valid OpenAI API key for embeddings and language models
  • Configured Pinecone database with indexed information
  • Reference documents or texts to build the knowledge base

Service Value

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

Apps Used

Telegram OpenAI Document Default Data Loader Text Splitter LLM Chain Vector Store Lm Chat Groq

Details

Trigger Automatic trigger
Nodes 20
Apps 7
Views 236
Downloads 158

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

/

Telegram Trigger

Set

#1

Embeddings OpenAI

OpenAI

#2

Default Data Loader

Document Default Data Loader

#3

Recursive Character Text Splitter

Text Splitter Recursive Character Text Splitter

#4

Stop and Error

Stop And Error

#5

Question and Answer Chain

Chain Retrieval Qa

#6

Vector Store Retriever

Retriever Vector Store

#7

Pinecone Vector Store1

Vector Store Pinecone

#8

Groq Chat Model

Lm Chat Groq

#9

Sticky Note

Sticky Note

#10

Sticky Note1

Sticky Note

#11

Check If is a document

If

#12

Change to application/pdf

Code

#13

Telegram get File

Set

#14

Embeddings

OpenAI

#15

Telegram Response

Set

#16

Telegram Response about Database

Set

#17

Stop and Error1

Stop And Error

#18

Pinecone Vector Store

Vector Store Pinecone

#19

Limit to 1

Limit

#20