# Advanced Telegram bot, ticketing system, liveChat, user: n8n workflow

> Started by an incoming Telegram message, and works across Redis and Telegram. 31 steps, 7 branches, 2 loops or waits: large, and worth reading before you...

Source: https://millionrounds.com/workflow/advanced-telegram-bot-ticketing-system-livechat-user (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Customer support](https://millionrounds.com/workflows?category=Customer+support#library)

# Advanced Telegram bot, ticketing system, liveChat, user

Started by an incoming Telegram message, and works across Redis and Telegram. 31 steps, 7 branches, 2 loops or waits: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fadvanced-telegram-bot-ticketing-system-livechat-user)

**31 steps** Large: read it before trusting it with anything live

**7** Branches: places the flow splits

**2** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Logic 15 Service 15

The steps in the order they run, from what starts it.

- 1 **Telegram-Bot** Telegram trigger *Starts it*
- 2 **Bot-Config** Set *Logic*
- 3 **Format** Code *Logic*
- 4 **Bot-Fields** Set *Logic*
- 5 **1st** Switch *Logic*
- 6 **Check User in Database** Redis *Service*
- 7 **Support Forum** If *Logic*
- 8 **IF Verified Channel** If *Logic*
- 9 **New User?** If *Logic*
- 10 **From Ticket** If *Logic*
- 11 **Retrieve all users in DB** Redis *Service*
- 12 **No Operation, do nothing** No Op *Logic*
- 13 **Save User Data** Redis *Service*
- 14 **Update User Data** Redis *Service*
- 15 **Forward Support Reply To User** Http Request *Service*
- 16 **IF Topic Created** If *Logic*
- 17 **Format Users** Code *Logic*
- 18 **Create Topic (Chat Ticket)** Http Request *Service*
- 19 **Get User Chat Topic** Redis *Service*
- 20 **Send User Ticket Created Notification** Telegram *Service*
- 21 **Filter Blocked Users** Filter *Logic*
- 22 **Save Topic ID** Redis *Service*
- 23 **Forward New Message** Http Request *Service*
- 24 **Split In Batches1** Split In Batches *Logic*
- 25 **IF No Topic Created** If *Logic*
- 26 **Broadcast Channel Post into Users** Http Request *Service*
- 27 **ReCreate Topic (Chat Ticket)** Http Request *Service*
- 28 **Wait1** Wait *Logic*
- 29 **Set Blocked Member** Redis *Service*
- 30 **ReSave Topic ID** Redis *Service*
- 31 **Forward New Message to the recrated topic** Http Request *Service*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 31, with 7 branches, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Redis, Telegram
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Redis and Telegram accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 31 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 31 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fadvanced-telegram-bot-ticketing-system-livechat-user)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Redis](https://millionrounds.com/workflows?service=Redis#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also customer support, with the same services where possible, closest in size first.

- [**WhatsApp to Chatwoot message forwarder with Postgres and Redis** 31 steps · Postgres, Redis](https://millionrounds.com/workflow/whatsapp-to-chatwoot-message-forwarder-with-postgres-and-red)
- [**Automated customer support system with Gmail** 31 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/automated-customer-support-system-with-gmail)
- [**Answer FAQs and route Telegram users to support with Postgres** 29 steps · Postgres, Telegram](https://millionrounds.com/workflow/answer-faqs-and-route-telegram-users-to-support-with-postgre)
- [**Automate Telegram support handover from AI to humans with GPT4** 33 steps · calls a model · Email, Telegram](https://millionrounds.com/workflow/automate-telegram-support-handover-from-ai-to-humans-with-gp)
- [**Answer Telegram data questions with DeepSeek and Open-Meteo** 25 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/answer-telegram-data-questions-with-deepseek-and-open-meteo)
- [**Telegram request router with DeepSeek and OpenAI** 25 steps · calls a model · Telegram](https://millionrounds.com/workflow/telegram-request-router-with-deepseek-and-openai)
