AI Agents

Build an AI Telegram bot with custom HTTP tools and memory

8 nodes 323 169 Automatic trigger
Download

Workflow Description

Automation that receives messages via Telegram and processes them using OpenAI's intelligence, maintaining conversation context in memory while executing custom HTTP requests through integrated tools for extended capabilities.

How it works

  1. 1.Receive incoming user message from Telegram channel
  2. 2.Process text through intelligent agent powered by OpenAI GPT model
  3. 3.Invoke custom HTTP tools to execute external actions based on user intent
  4. 4.Maintain conversation context by storing last 10 messages in buffer memory
  5. 5.Send intelligent response back to user in Telegram chat

Use cases

  • Customer support bot that answers FAQs and retrieves data from external databases
  • Personal assistant that manages tasks and reminders through natural conversation
  • Research bot that gathers information from multiple sources and summarizes findings

Requirements

  • Active Telegram Bot token obtained from BotFather
  • OpenAI API key to access GPT models
  • Configured HTTP endpoints for external tools and services to be called
  • Sufficient memory allocation for concurrent conversation sessions

Service Value

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

Apps Used

OpenAI Memory Telegram HTTP Request AI Agent

Details

Trigger Automatic trigger
Nodes 8
Apps 5
Views 323
Downloads 169

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

OpenAI Chat Model

OpenAI

#1

Window Buffer Memory

Memory Buffer Window

#2

Listen for incoming events

Set

#3

Sticky Note

Sticky Note

#4

Send final reply

Set

#5

Send back an image

Set

#6

Generate image in Dalle

HTTP Request

#7

AI Agent

Agent

#8