AI Agents

Telegram automation

20 nodes 234 157 Automatic trigger
Download

Workflow Description

An automation template that connects Telegram conversations with an advanced AI model, processing incoming messages through a retrieval-augmented chain that queries vector databases and responds with contextually relevant, document-backed intelligent replies.

How it works

  1. 1.Receive messages from Telegram channels using the native trigger node
  2. 2.Embed incoming text into vectors using OpenAI embeddings and store in Pinecone
  3. 3.Search for relevant documents from the vector database using retrieval mechanism
  4. 4.Process queries through an LLM Chain to generate context-aware responses
  5. 5.Send intelligent replies back to Telegram users in real time

Use cases

  • Build a Telegram chatbot that answers customer questions based on company documents and policies
  • Create a technical support robot that retrieves solutions from an organized knowledge base
  • Develop an automated consultation system providing reliable answers from pre-stored content

Requirements

  • Active Telegram account with bot API token
  • OpenAI API key for embeddings functionality
  • Configured Pinecone vector database populated with documents
  • Access credentials for LM Chat Groq or alternative AI service

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 234
Downloads 157

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