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 Apr 2, 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

Build automated WhatsApp chatbot with product catalog knowledge base

This Latenode automation template builds a WhatsApp chatbot that allows users to interact with a service or database, providing automated responses to inquiries and facilitating real-time communication through the WhatsApp Business API. The chatbot is powered by a product catalog vector store, which serves as a knowledge base to help the AI-driven agent better understand and respond to customer questions. The workflow captures incoming WhatsApp messages, filters out non-text messages, and then uses the product catalog to generate relevant responses that are sent back to the user. This solution can be configured with WhatsApp Business Cloud API and OpenAI API credentials, as well as the URL for the product brochure PDF.

19s$0.0012
Messaging & bots

Automate Telegram messaging and notifications via Zapier schedule

The Zapier Telegram Integration allows users to automatically send scheduled messages, notifications, polls, or photos through a Telegram bot at specific intervals defined within a Zapier workflow. This integration simplifies the process of recurring communication on the Telegram messaging platform, enabling users to set up customizable triggers (e.g., daily, weekly, monthly) to send content to targeted chat IDs. The integration connects the Schedule by Zapier app with the Telegram platform, allowing users to streamline their communication without the need for complex programming.

3s$0.0002
Messaging & bots

Generate and Share ChatGPT-Powered Images on Telegram

This Latenode automation template allows users to generate images using the ChatGPT language model and send those images directly to a Telegram chat or channel. Users provide a text prompt, which is then used by ChatGPT to generate an image. The generated image is then automatically sent to the specified Telegram destination. This template is designed to simplify the process of creating image-based content for Telegram users, combining the capabilities of ChatGPT and Telegram in a single, streamlined workflow.

16s$0.0010