AI Agents

Reply to Telegram messages with an AI-powered OpenAI agent

27 nodes 300 145 Automatic trigger
Download

Workflow Description

An automation that listens to Telegram messages and forwards them to an intelligent agent powered by OpenAI for smart responses. It supports document search, contextual memory, calculations, and sends results back to the user directly on Telegram.

How it works

  1. 1.Receive incoming messages from Telegram users automatically
  2. 2.Process and split text into vectors for intelligent semantic search
  3. 3.Route the query to an AI agent that uses OpenAI with additional tools
  4. 4.Search vector databases or Wikipedia depending on the context and query type
  5. 5.Send the agent-generated response back to the user via Telegram

Use cases

  • Smart assistant bot that answers user questions directly in Telegram with accurate information
  • Document-based inquiry system: upload files, ask questions about them, and get instant answers
  • Administrative assistant that handles calculations, logical operations, and generates quick reports

Requirements

  • Active Telegram bot token or webhook URL that is accessible and running
  • Valid OpenAI API key (GPT-3.5 or newer for optimal performance)
  • Optional Qdrant vector database server (local or cloud-hosted) for advanced semantic search
  • The workflow includes additional tools (calculator, Wikipedia) that must be enabled or configured

Service Value

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

Apps Used

Telegram AI Agent Tool HTTP Request OpenAI Vector Store Document Default Data Loader Text Splitter Memory

Details

Trigger Automatic trigger
Nodes 27
Apps 9
Views 300
Downloads 145

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

/

Telegram Trigger

Set

#1

Ultimate Assistant

Agent

#2

Email Agent

Tool Workflow

#3

Contact Agent

Tool Workflow

#4

Content Creator Agent

Tool Workflow

#5

Tavily

HTTP Request

#6

Calendar Agent

Tool Workflow

#7

Download File

Set

#8

Transcribe

OpenAI

#9

Calculator1

Tool Calculator

#10

Set 'Text'1

Set

#11

Switch1

Switch

#12

Response1

Set

#13

Wikipedia

Tool Wikipedia

#14

Qdrant Vector Store

Vector Store Qdrant

#15

Default Data Loader

Document Default Data Loader

#16

Recursive Character Text Splitter

Text Splitter Recursive Character Text Splitter

#17

OpenAI Chat Model

OpenAI

#18

Embeddings OpenAI1

OpenAI

#19

Qdrant Vector Store1

Vector Store Qdrant

#20

Embeddings OpenAI

OpenAI

#21

Window Buffer Memory

Memory Buffer Window

#22

Download File1

Set

#23

Code

Code

#24

If

If

#25

Edit Fields

Set

#26

Edit Fields1

Set

#27