Logo

Agenthost.ai

Picture of gpts

How to connect your OpenAI custom GPT to Telegram

Creating a custom GPT is fantastic but connecting it to Telegram and letting other people use it through the app as a bot is even better.

“Go where your users are” is an age-old proverb but its generally true. ChatGPT has over 100 million users but most of those people are going there just to ask ChatGPT a simple question. While that’s impressive, Telegram has over 800 million monthly active users and is a central part of a huge number of people's daily lives — while ChatGPT is mainly used for work. This means there's a huge opportunity to reach more people as they naturally go through their lives and build a brand that people come back to. To do this, you’ll need to bring your GPT to Telegram and we’re here to show you how.

1) Turn your GPT into an Assistant and create your telegram bot

The first thing that needs to be done is converting your GPT into an Assistant. Doing this is important because OpenAI does not allow you to use the API to talk to your GPT. The assistant API however does allow you programatically control and get responses from your agent. If you’d rather not deal with manually setting this up, you can utilize a GPT hosting platform like agenthost to automatically do this for you. Just provide your GPT information and you’ll get a hosted version of your GPT complete with its own API and telegram webhook URL.

Create your telegram bot by talking to BotFather

Next, you need to create a telegram bot by chatting with BotFather on Telegram. Create a bot through the command and you’ll receive your bot token. Think of this essentially as your secret token and you’ll use the Telegram webhook API to set your GPT’s ingestion endpoint as your bot’s webhook URL.

Try Agenthost.ai for hosting your GPT

Agenthost.ai lets anyone use your GPT without needing an OpenAI account and lets you connect your GPT to telegram and so many places in minutes. Join thousands of creators who are generating revenue from their GPT and reaching more users.

Agenthost.ai

2) Connect your new bot to your GPT webhook

In Agenthost, we do this by selecting Deploy > Telegram and then just copying and pasting our bot token into the field. This sets the webhook behind the scenes and connects your agent's responses to it.

Test your bot by sending a message

Once you have your webhook set up to an ingestion and response url for your GPT, you’re good to go and can now start directly messaging your agent on Telegram! You can now share it widely with others and start understanding how it’s used in the real world!

Agenthost.ai

Host and monetize your OpenAI GPT and Assistants

© 2024 TheRoaming, Inc. All rights reserved.