Latenode

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

This template watches your Telegram bot for new messages, looks up or creates the user in Latenode Database, and opens or reuses a support ticket.

It forwards the user message to your support chat and sends the team's reply back. For a broadcast, JavaScript loads stored users and Telegram sends the update. Connect Telegram. Put the bot token on the Telegram connection.

Updated Sep 16, 2026Est. run: 51sEst. cost: $0.0032
How Latenode estimates time and cost

Latenode bills workflow runtime in CPU seconds. The first 10,000 CPU seconds are free each month, then usage follows pay-as-you-go CPU-second pricing. 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 CPU seconds work →

Workflow preview

What this template does

  • Turns Telegram bot messages into support tickets
  • Stores users and ticket ids in Latenode Database
  • Forwards messages to the support chat and replies back to the user
  • Broadcasts updates to stored users from a trusted chat

How it works

1
Trigger

Watch Telegram messages

The scenario starts when someone sends a message to your Telegram bot.

2
Logic

Load or save the user

Latenode Database returns the user record, or JavaScript creates one with chat id and name.

3
Action

Open the ticket and forward

JavaScript reuses the stored ticket id or opens a new forum topic, then Telegram forwards the message to the support chat.

4
Action

Reply and broadcast

When support replies, Telegram sends that text back to the user. For a broadcast, JavaScript loads users from Latenode Database and Telegram sends the update.

Setup guide

1

Connect Telegram

Add a Telegram connection and paste your bot token there. Add a trigger for new updates on that bot. Set the support chat id the bot can post in.

2

Store users in Latenode Database

Create an object per user with chat id, name, ticket id, and a blocked flag. Look up by chat id on every incoming message.

3

Wire tickets and replies

In JavaScript, if the message is from a user, open or reuse a ticket and forward it to the support chat. If the message is a support reply, send it back to that user's chat id.

4

Set up broadcasts

When a message arrives from the broadcast chat you trust, load users from Latenode Database, skip blocked records, and send the text with Telegram. Pause briefly between batches if you send to a large list. Test with one user first.

Requirements

A Telegram bot token stored on the Telegram connection
A support chat the bot can post in, plus that chat id
Latenode Database to store user chat ids and ticket ids

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.