Telegram automation
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.Receive message from Telegram and validate trigger event
- 2.Process message through OpenAI agent with precise information extraction
- 3.Manage conversation memory via Redis and store historical context
- 4.Execute connected tools including X platform interactions
- 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
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (39)
Human Handoff using Send and Wait
Set
Set Interaction to Bot
Redis
Set Interaction to Human
Redis
Get Interaction State
Redis
Model
OpenAI
Memory
Memory Redis Chat
Handoff Subworkflow
Execute Workflow Trigger
Telegram Trigger
Set
Send Response
Set
Switch Interaction
Switch
Information Extractor
Information Extractor
OpenAI Chat Model
OpenAI
With Defaults
Code
Has All Criteria?
If
Onboarding Agent
Agent
Get Onboarding Chat History
Redis
After Sales Agent
Agent
Memory1
Memory Redis Chat
Model1
OpenAI
Handoff Tool
Tool Workflow
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Handoff Subworkflow1
Execute Workflow
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note6
Sticky Note
Sticky Note7
Sticky Note
Send Response2
Set
Memory2
Memory Redis Chat
Update Agent Memory
Memory Manager
Send Response3
Set
Get Canned Response
Set
Notify user
Set
Sticky Note8
Sticky Note
Memory3
Memory Redis Chat
Update Agent Memory1
Memory Manager
Continue Conversation
Set