Latenode

Telegram bot: Chat with OpenAI GPT-3.5 in your chat app

This Telegram bot allows users to interact with OpenAI's GPT language models, enabling them to send text prompts and receive AI-generated responses directly within the chat interface.

The bot is triggered by new messages received on a Telegram channel or bot, which are then processed by the AI Agent and sent to the OpenAI Chat Model to generate a response. The response is then sent back to the user, with emojis added for a more engaging experience. This solution provides an easy way for users to leverage the power of GPT-3.5 through a familiar Telegram chat interface.

Updated May 8, 2026Est. run: 19sEst. cost: $0.0012
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

  • Enables users to interact with OpenAI's GPT models through a Telegram chat interface
  • Processes text prompts received on a Telegram channel or bot
  • Generates AI-powered responses using the OpenAI Chat Model
  • Returns the AI-generated responses to users with emojis for a more engaging experience
  • Provides an easy way for users to leverage the power of GPT-3.5 through a familiar chat app

How it works

1
Trigger

Telegram Trigger

New messages received on the Telegram channel or bot trigger the Telegram integration.

2
Logic

AI Agent

The AI Agent processes the message text and sends it to the OpenAI Chat Model.

3
AI

OpenAI Chat Model

The OpenAI Chat Model generates a response using GPT-3.5 based on the user's message.

4
Action

Send to Telegram

The generated response is sent back to the Telegram channel or bot, with emojis added for a more engaging experience.

Setup guide

1

Add Telegram Credential

Add your Telegram bot API key as a Latenode Credential in the Credentials panel.

2

Add OpenAI Credential

Add your OpenAI API key as a Latenode Credential in the Credentials panel.

3

Configure Telegram Trigger Node

In the Latenode visual builder, add a Telegram Trigger node and select the Telegram credential you created in the previous step. Configure the node to listen for new messages on your Telegram bot or channel.

4

Configure OpenAI Chat Model Node

Add an OpenAI Chat Model node to your workflow. In the node settings, select the OpenAI credential you created earlier. Configure the node to use the GPT-3.5 model for text generation.

5

Add Telegram Response Node

Finally, add a Telegram node to your workflow to send the generated responses back to the Telegram bot or channel. In the node settings, map the response data from the OpenAI Chat Model node and configure the chat ID or channel ID to send the messages to.

Requirements

Obtain a Telegram bot API token by creating a new bot with the BotFather in Telegram
Obtain an OpenAI API key by signing up for an OpenAI account and creating a new API key
Set up a Latenode workspace and add the Telegram and OpenAI integrations, configuring the bot's API token and OpenAI API key as workspace secrets
Create a Telegram bot node in the Latenode workspace and configure it to listen for new messages from the Telegram channel or bot
Create an OpenAI Chat Model node in the Latenode workspace and configure it to generate responses based on the user's text prompts
Add logic to the Latenode workflow to process incoming Telegram messages, send them to the OpenAI Chat Model, and return the generated response back to the Telegram user
Add error handling and monitoring to the Latenode workflow to ensure the bot is functioning correctly and notify of any issues

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.

34s$0.0021
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.

5s$0.0003
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.

18s$0.0011