Automate Telegram Messages with Batch Processing and Redis Storage
Workflow Description
Advanced automation that receives Telegram messages, organizes them into processing batches, stores data in Redis, and executes conditional logic to route messages and trigger actions automatically based on message content and predefined rules.
How it works
- 1.Receive incoming messages from Telegram trigger
- 2.Split messages into batches using Split In Batches node
- 3.Evaluate conditional statements and route batches to appropriate paths
- 4.Execute code operations and HTTP requests based on logic
- 5.Store results and state information in Redis
- 6.Send automated responses back to Telegram users
Use cases
- Customer support bots that classify inquiries and route them automatically
- Batch notification systems that handle high-volume messaging efficiently
- Command processing pipelines with caching and validation checks
Requirements
- Active Telegram Bot account with valid API token
- Connected Redis server or access credentials
- Basic understanding of conditional logic and code execution
Service Value
Ready-made workflow template for automation delivery and service execution.
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 (36)
Sticky Note
Sticky Note
New User ?
If
Format
Code
Bot-Fields
Set
Create Topic (Chat Ticket)
HTTP Request
Save Topic ID
Redis
Get User Chat Topic
Redis
Forward New Message
HTTP Request
IF No Topic Created
If
ReCreate Topic (Chat Ticket)
HTTP Request
ReSave Topic ID
Redis
Sticky Note1
Sticky Note
Update User Data
Redis
Save User Data
Redis
Support Forum
If
From Ticket
If
Forward Support Reply To User
HTTP Request
IF Topic Created
If
Forward New Message to the recrated topic
HTTP Request
No Operation, do nothing
No Op
Check User in Database
Redis
Sticky Note2
Sticky Note
Send User Ticket Created Notification
Set
Sticky Note3
Sticky Note
Bot-Config
Set
Telegram-Bot
Set
1st
Switch
Split In Batches1
Split In Batches
Wait1
Wait
Format Users
Code
Broadcast Channel Post into Users
HTTP Request
Set Blocked Member
Redis
IF Verified Channel
If
Filter Blocked Users
Filter
Sticky Note4
Sticky Note
Retrieve all users in DB
Redis