AI Agents

Intelligent Telegram Responses Using OpenAI

22 nodes 301 164 Automatic trigger
Download

Workflow Description

An automation that receives Telegram messages and processes them through a smart agent integrating OpenAI and Gemini, maintaining conversation context in memory to deliver intelligent and coherent replies automatically.

How it works

  1. 1.Receive incoming message from Telegram via trigger
  2. 2.Process message through intelligent agent using OpenAI and Gemini
  3. 3.Preserve conversation history and context in memory
  4. 4.Send smart response back to user in Telegram

Use cases

  • Automated customer support that answers inquiries on Telegram
  • Intelligent personal assistant that learns from previous conversation context

Requirements

  • Valid API keys for OpenAI and Gemini
  • Bot token for Telegram access

Service Value

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

Apps Used

AI Agent Gemini Telegram OpenAI Memory

Details

Trigger Automatic trigger
Nodes 22
Apps 5
Views 301
Downloads 164

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

/

AI Agent

Agent

#1

Google Gemini Chat Model

Gemini Model

#2

Recieve Telegram Message

Set

#3

Check For Text or Voice Message

Set

#4

Download Audio File

Set

#5

Transcribe Audio File

OpenAI

#6

If Voice Message

If

#7

Code to remove unwanted characters from LLM response

Code

#8

Code to split output into chunks under 4000 characters

Code

#9

Respond to Telegram Message

Set

#10

Wipe Conversation Memory

Memory Manager

#11

Store Conversation Memory

Memory Buffer Window

#12

Set prompt to start a new speech

Set

#13

Set prompt to generate a speech based on the feedback

Set

#14

Set prompt to provide feedback on speech

Set

#15

Route Flow Based on Message Content

Switch

#16

Sticky Note

Sticky Note

#17

Sticky Note1

Sticky Note

#18

Sticky Note2

Sticky Note

#19

Sticky Note3

Sticky Note

#20

Sticky Note4

Sticky Note

#21

Sticky Note5

Sticky Note

#22