AI Agents

Telegram automation

39 nodes 255 122 Automatic trigger
Download

Workflow Description

Advanced Telegram automation integrating an AI agent powered by OpenAI with Redis-based conversation memory and X platform connectivity. Enables intelligent interaction through Telegram messages while maintaining conversation context and history automatically.

How it works

  1. 1.Receive message from Telegram and validate trigger event
  2. 2.Process message through OpenAI agent with precise information extraction
  3. 3.Manage conversation memory via Redis and store historical context
  4. 4.Execute connected tools including X platform interactions
  5. 5.Send intelligent response back to Telegram based on agent processing

Use cases

  • Build intelligent Telegram assistant that answers user queries while maintaining conversation context
  • Automatically publish updates and content to X based on user instructions via Telegram
  • Manage multi-turn conversations while preserving long-term conversation memory

Requirements

  • Active Telegram account with bot token and chat ID
  • OpenAI API key with access to advanced language models
  • Redis server or database instance for conversation memory management
  • X (formerly Twitter) account with API credentials if platform posting is required

Service Value

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

Apps Used

Telegram Redis OpenAI Memory Twitter/X AI Agent Tool

Details

Trigger Automatic trigger
Nodes 39
Apps 7
Views 255
Downloads 122

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

/

Human Handoff using Send and Wait

Set

#1

Set Interaction to Bot

Redis

#2

Set Interaction to Human

Redis

#3

Get Interaction State

Redis

#4

Model

OpenAI

#5

Memory

Memory Redis Chat

#6

Handoff Subworkflow

Execute Workflow Trigger

#7

Telegram Trigger

Set

#8

Send Response

Set

#9

Switch Interaction

Switch

#10

Information Extractor

Information Extractor

#11

OpenAI Chat Model

OpenAI

#12

With Defaults

Code

#13

Has All Criteria?

If

#14

Onboarding Agent

Agent

#15

Get Onboarding Chat History

Redis

#16

After Sales Agent

Agent

#17

Memory1

Memory Redis Chat

#18

Model1

OpenAI

#19

Handoff Tool

Tool Workflow

#20

Sticky Note

Sticky Note

#21

Sticky Note1

Sticky Note

#22

Sticky Note2

Sticky Note

#23

Handoff Subworkflow1

Execute Workflow

#24

Sticky Note3

Sticky Note

#25

Sticky Note4

Sticky Note

#26

Sticky Note5

Sticky Note

#27

Sticky Note6

Sticky Note

#28

Sticky Note7

Sticky Note

#29

Send Response2

Set

#30

Memory2

Memory Redis Chat

#31

Update Agent Memory

Memory Manager

#32

Send Response3

Set

#33

Get Canned Response

Set

#34

Notify user

Set

#35

Sticky Note8

Sticky Note

#36

Memory3

Memory Redis Chat

#37

Update Agent Memory1

Memory Manager

#38

Continue Conversation

Set

#39