Automate Telegram Support Tickets with n8n Bot Integration

Struggling to manage Telegram support conversations and lost message history? This n8n workflow automates Telegram message forwarding, ticket creation, and broadcasting, turning your support group into an efficient ticketing system that safeguards client interactions.
telegram
redis
httpRequest
+10
Workflow Identifier: 2024
NODES in Use: stickyNote, if, code, set, httpRequest, redis, telegram, telegramTrigger, switch, splitInBatches, wait, filter, noOp

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow manages Telegram support messages by creating and organizing tickets for every user question automatically.
It stops messages from getting lost or deleted in the support group.
User messages are saved and forwarded into separate forum topics, making chat easy to follow.
Replies from team members get sent back to users without extra work.
Broadcasts from a Telegram channel reach all users who talked to support.
It also handles cases where ticket topics close or delete, recreating them.


Tools and Services Used

  • Telegram Bot API: Receives user messages.
  • Redis Database: Stores user info, ticket topics, and block status.
  • n8n Automation Platform: Runs the workflow using Telegram and Redis nodes.

Beginner Step-by-Step: How to Use This Workflow in n8n

1. Import the Workflow

  1. Download the workflow JSON file using the Download button on this page.
  2. Open the n8n editor and select “Import from File”.
  3. Choose the downloaded JSON file to load the workflow.

2. Configure Credentials and IDs

  1. Open the Bot-Config node.
  2. Paste your Telegram Bot API Key.
  3. Enter the Support Group ID where tickets will be created.
  4. Enter the Broadcast Channel ID used for announcements.
  5. Set your Redis credentials in the nodes that connect to the Redis database.

3. Test the Workflow

  1. Send a message to your Telegram Bot from a private chat.
  2. Check if a ticket (forum topic) is created in your Support Group.
  3. Make sure messages forward correctly to the ticket.
  4. Send replies from Support Group and verify they reach your private chat.

4. Activate the Workflow

  1. After testing, activate the workflow in n8n to run continuously.
  2. Ensure the Telegram Bot webhook URL is set to n8n’s URL for live updates.
  3. If using self-host n8n, keep your server running.

Input → Processing → Output

Inputs

  • User messages sent to Telegram Bot in private chat.
  • Support team messages in Telegram Support Group.
  • Broadcast messages posted in Telegram Channel.

Processing Steps

  • Format and clean incoming user messages.
  • Check Redis database if user exists.
  • Create new forum topic (ticket) for new users.
  • Forward user messages to appropriate forum topic.
  • Forward support team replies back to users.
  • Save and update user and ticket info in Redis.
  • Handle topic recreation if deleted or missing.
  • Broadcast channel messages to all non-blocked users in batches.

Output

  • Support tickets created as forum topics for each user.
  • User messages organized in ticket threads.
  • Support replies returned to user chats.
  • Announcements sent to all active users.
  • Redis database keeps user and ticket status updated.

Handling Edge Cases and Failures

If the Telegram forum topic for a ticket is deleted, the workflow detects this when forwarding messages fails.
It automatically recreates the topic using the Telegram API and updates Redis.
This avoids losing any messages or conversations.

If Redis connections fail or keys are missing, the workflow stops updates.
The user should check Redis credentials and connection separately to fix.

If the bot lacks admin rights or permissions in the support group, message forwarding fails.
Make sure the bot is an admin with rights to create topics and manage messages.


Customization Ideas

  • Change Support Group or Bot IDs in Bot-Config for your own setup.
  • Edit HTTP nodes “Create Topic” and “ReCreate Topic” to rename tickets or add user info.
  • Add handling for message edits to sync changes later.
  • Adjust batch size in “Split In Batches1” node to manage Telegram rate limits.
  • Add more user fields to store in Redis for richer user profiles.

Summary

→ Organizes Telegram support messages into tickets.
→ Prevents message loss by saving them in forum topics.
→ Forwards team replies back to users automatically.
→ Broadcasts announcements to all interacting users.
→ Handles errors by recreating closed ticket threads.
→ Saves user and ticket data in Redis for tracking.
→ Saves time and improves support team efficiency.


Frequently Asked Questions

The workflow creates a forum topic in the Telegram support group for each new user message, organizing messages into separate tickets.
Replies from the support group are forwarded back to the user’s private chat automatically, maintaining conversation flow.
Broadcasts are detected from posts in the Telegram channel and sent in batches to all users who interacted, except those blocked.
The workflow recreates deleted forum topics automatically and updates Redis, preventing message loss.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free