Latenode

Automate Telegram bot support with ticketing, Redis user data, and broadcasting

This comprehensive n8n workflow enhances Telegram bot functionality, enabling automated support ticket creation, efficient user data management in Redis, and a sophisticated system for message forwarding and broadcasting.

It provides a centralized platform for users to interact with the bot, creating support tickets, and receiving responses from the support team. The workflow handles user data storage, message routing, and scheduled broadcasting of updates to all users, making it a powerful tool for businesses and organizations that rely on Telegram for customer support and communication.

Updated Apr 6, 2026Est. run: 26sEst. cost: $0.0703
How Latenode estimates time and cost

Latenode bills workflow runs in credits: 1 credit = 30 seconds of processing. Minimum charge per run depends on your plan. Plug-and-Play (PnP) AI nodes are billed separately—each PnP token is $1 USD, charged pay-as-you-go at vendor cost plus a small processing fee, with no API keys required.

Full pricing — how credits work →
Messaging & bots

Workflow preview

What this template does

  • Creates support tickets from user messages in Telegram
  • Stores user data and support conversations in Redis
  • Forwards support requests to a designated support channel
  • Broadcasts updates and announcements to all Telegram users
  • Generates a centralized support platform for Telegram users

How it works

1
Trigger

Receive Telegram Message

The workflow is triggered by a new message received in the Telegram bot. It parses the message details, including the user ID, chat ID, and message content.

2
Logic

Check User Data in Redis

The workflow retrieves the user's information from the Redis database to determine if they are a new or existing user.

3
Logic

Save New User Data in Redis

If the user is new, the workflow stores their details in the Redis database for future reference.

4
Action

Create Telegram Forum Topic

The workflow creates a new support ticket for the user by opening a new Telegram forum topic.

5
Action

Store Ticket ID in Redis

The workflow saves the new forum topic ID in the Redis database, associating it with the user.

6
Logic

Retrieve Existing Ticket ID

If the user has an existing open support ticket, the workflow retrieves the associated forum topic ID from the Redis database.

7
Action

Forward Message to Support Group

The workflow forwards the user's message to the support forum topic, allowing the support team to respond.

8
Logic

Recreate Telegram Forum Topic

If the support forum topic was not found, the workflow creates a new one and updates the user's data in Redis with the new topic ID.

9
Action

Forward Support Reply to User

When the support team responds in the forum topic, the workflow forwards their reply back to the user.

10
Action

Notify User of New Ticket

If a new support ticket was just created, the workflow sends a message to the user informing them of the new ticket.

11
Logic

Retrieve All User Data

The workflow retrieves the full list of users from the Redis database to prepare for a broadcast message.

12
Logic

Format User Data

The user data is transformed into a format suitable for broadcasting messages to the users.

13
Logic

Filter Out Blocked Users

The workflow removes any users who have been blocked from receiving broadcast messages.

14
Logic

Split Users into Batches

The list of users is divided into smaller batches to avoid rate limits when broadcasting messages.

15
Action

Broadcast to Users

The workflow sends the broadcast message to the batched users.

16
Action

Mark Users as Blocked

If any users failed to receive the broadcast message, their 'Blocked' flag is set in the Redis database.

Setup guide

1

Configure Telegram Bot

1. Add a new Telegram Bot credential in the Latenode Credentials panel. 2. In the Latenode Telegram Bot node settings, select the Telegram Bot credential you just added. 3. Configure the Telegram Bot node settings, including the chat IDs for the support group and broadcast channel.

2

Set up Redis Connection

1. Add a new Redis credential in the Latenode Credentials panel, including the host, port, and password (or use Latenode Secrets). 2. In the Latenode Redis node settings, select the Redis credential you just added. 3. Configure the Redis node settings, including the key prefix for storing user data.

3

Map Telegram User Data

1. In the Latenode Telegram Bot node settings, map the relevant Telegram user data fields (e.g., chat_id, first_name, last_name) to variables that will be used throughout the workflow. 2. In the Latenode Redis node settings, map the variables from the Telegram node to the corresponding Redis keys for storing user data.

4

Set up Telegram Ticket Handling

1. In the Latenode Telegram Bot node settings, configure the node to listen for different chat types (private, supergroup, channel). 2. In the Latenode code nodes, implement the logic for creating new support tickets, forwarding messages to the support group, and replying back to users.

5

Configure Telegram Broadcast

1. In the Latenode Telegram Bot node settings, configure the node to send messages to the broadcast channel. 2. In the Latenode code nodes, implement the logic for retrieving all user data from Redis, filtering out blocked users, and sending batched broadcasts to the users.

Requirements

Create a Telegram bot and obtain the bot token
Set up a Redis database to store user data and ticket information
Obtain a Telegram API key to enable the bot's functionality
Configure the n8n workflow to connect to the Telegram Bot API and Redis database

FAQ

Common questions about this template

Each run uses credits on your Latenode plan. We charge for processing time (1 credit = 30 seconds). Your actual cost depends on your plan and how long the run takes. See pricing plans for plans and how credits work.

More templates

You might also like

Browse all templates →
Messaging & bots

Automate WhatsApp Sales with AI Chatbots and Product Data

This Latenode automation allows users to build a WhatsApp chatbot that acts as a sales agent, providing automated responses to customer inquiries. The chatbot is powered by a product catalog vector store and an AI language model, allowing it to understand and respond to user messages in real-time. The workflow involves importing a product brochure, extracting the text, creating a vector store, and using the OpenAI language model and a memory buffer to generate relevant responses to WhatsApp users. The chatbot can handle both text messages and non-text messages, with the latter triggering a standard response. This automation is designed for businesses looking to enhance their customer support and sales efforts through a conversational WhatsApp interface.

26s$0.0703
Messaging & bots

Instantly sync Facebook Messenger to your WhatsApp for real-time alerts

This automation allows users to automatically send incoming Facebook Messenger messages to a specified WhatsApp account as real-time notifications. It is designed for users who need to stay on top of their Facebook Messenger communications while on the go, allowing them to respond quickly via WhatsApp. The automation integrates with Facebook Messenger and WhatsApp to monitor for new messages and forward them to the designated WhatsApp contact.

26s$0.0703
Messaging & bots

Automate Telegram Chatbots with AI-Powered Responses

This AI-powered Telegram bot aims to provide instant, relevant replies to user messages by integrating with advanced AI models. The bot will analyze incoming messages and generate appropriate responses tailored to the user's queries, drawing from the capabilities of language models and other AI technologies. This solution is designed to streamline communication and enhance the user experience within the Telegram messaging platform, offering an intelligent and conversational interface that can handle a wide range of user inquiries efficiently.

26s$0.0703