Latenode

Automate Telegram Chatbots with AI-Powered Responses

This template listens for Telegram bot messages, reads the text in JavaScript, asks ChatGPT for a reply, and sends that reply in the same chat.

Connect Telegram and put the bot token on the Telegram connection. ChatGPT is a Latenode AI step, so you do not paste an OpenAI key.

Updated Sep 16, 2026Est. run: 18sEst. cost: $0.0011
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

  • Replies in Telegram as soon as a user messages the bot
  • Writes the reply with ChatGPT
  • Sends the answer back in the same chat
  • Keeps the bot token on the Telegram connection

How it works

1
Trigger

Listen for Telegram messages

The scenario starts when the bot receives a text message. JavaScript reads that text and the chat id.

2
AI

Write the reply

ChatGPT returns a reply from the user message. ChatGPT is Latenode AI, so you do not paste an OpenAI key.

3
Action

Send the Telegram reply

Telegram sends the reply back to the same chat.

Setup guide

1

Connect Telegram

Add a Telegram connection with your bot token. Add the bot to the chat that will send messages.

2

Watch new messages

Add a Telegram trigger for new updates so a user message starts the run.

3

Reply with ChatGPT

Read the message text and chat id in JavaScript, send the text to ChatGPT, then send the reply in Telegram. Map the chat id from the trigger. ChatGPT is a Latenode AI step.

Requirements

A Telegram bot token stored on the Telegram connection
A chat the bot can read and reply to

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. Plug-and-Play AI nodes are billed separately.