Create a chatbot in Telegram

Accept marketing cookies to play this video or watch it on YouTube.

A chatbot is an automated multifunctional assistant that can receive and send triggered messages. With SendPulse, your bot can save data as variables, allowing you to personalize your communication with customers in the future.

Follow this step-by-step guide to create your first Telegram chatbot or connect an existing one to SendPulse.

If you have already created a Telegram chatbot, you can go straight to the third section of this article.

Telegram chatbot features

Customer support. Chatbots can reply to messages 24/7 and send campaigns, event announcements, or updates. Create dedicated chatbot flows with your preferred commands to help resolve specific subscriber issues.

Personalization. Use the Filter element to branch your chatbot flow based on variables, group or channel memberships, last message types, or business profile contacts. You can also add personal data to messages and reply based on a subscriber’s previous actions.

Flow triggers. Set a specific trigger to launch your flow, for example, when users send specific keywords or join a group or channel. You can also enable messaging through Telegram Business.

AI-powered features. Integrate ChatGPT or other AI models so that your chatbot can answer free-form questions, not just scripted ones. The AI Agent element in your flow can guide the conversation along various branches depending on the context.

External queries and integrations. Your chatbot can make API calls to your system, retrieve data points, and generate replies based on them.

Create a new telegram chatbot

Go to Telegram app, log in to your account, or create a new one.

Type in @BotFather in the search field, and go to this bot.

Official Telegram chatbots have a blue checkmark next to their name.

Click Start to activate the BotFather chatbot.

You will receive a list of commands you can use to manage bots.

Select or type in the /newbot command, and send it.

Choose a name for your bot — your subscribers will see it during your conversations. You also need to pick a username for your bot so that users can find it using search. Your bot username must be unique and end with the word bot.

Once you choose a name for your chatbot, it will be created. You will receive a message with a link to your bot (t.me/<bot_username>), recommendations on how to set up a profile picture, description, and a list of commands you can use to manage your new bot.

To connect your bot to SendPulse, you need a token. Copy your token value — you can find more information on how to connect your bot to SendPulse.

Find a token for an existing bot

Go to the @BotFather bot, and send the /token command.

You will see buttons with your existing bots.

Select the required bot so that you can connect it to SendPulse.

Copy your token value.

Connect a Telegram chatbot to SendPulse

Go to the Chatbots section in your SendPulse account. If you have not connected any chatbots before, click Connect.

If you have already connected chatbots before, go to the Manage bots section, and click Add bot. You can also click Connect next to Telegram.

In the Telegram section, enter your bot token, and click Connect.

In the next window, click Subscribe.

You will be redirected to the Telegram app. Click Start, and you will subscribe to your bot.

Once you successfully connect your chatbot, you will receive its welcome flow, the bot will appear in your list of bots.

Create a chatbot scenario

The Welcome message, Standard reply, and Unsubscribe from flows are available by default. You can also create your own triggers and flows.

Plan out key conversations your chatbot should support, then build dedicated flows using chatbot builder elements. You can also manage flow branches based on user behavior using the Button, Filter, and AI Agent elements.

Read more: Create a chatbot structure and Tips on chatbot flow design.

You can also use AI to generate flows or apply ready-made templates that match your goals. This can significantly reduce the time spent on brainstorming and flow planning.

Once you’ve set up your chatbot and flows, you can add chatbot links to your website or pop-ups. If you have a list of subscriber IDs (8–10 digits each), you can import it.

You can also track your chatbot's behavior in your account statistics and chats with subscribers to analyze the user journey and improve user experience.

Rate this article about "Create a chatbot in Telegram"

User Rating: 4 / 5 (78)

Next

Trigger a Telegram chatbot flow

Popular in Our Blog

Create a free Telegram chatbot