Telegram
Telegram is a social networking platform that allows Telegram users to directly interact with our bot through their Telegram accounts. Telegram integration enables two-way conversations, facilitating seamless communication between users and the bot.
Telegram channel integration helps businesses to automate customer support, send campaigns (to send campaigns, a Telegram sender ID is required), collect user feedback, and so on.
This channel enables the following key features:
- Automated Replies: Provides the ability to automatically respond to user messages.
- Multi-message types support: You can use various message types including text, image, video, file, and carousel (which can only be used as a CTA), to enhance the communication experience.
Watch the video on how to setup Telegram channel:
Setting up Telegram chatbot
To set up Telegram bot, you need to perform the following:
- Create a bot on Yellow.ai platform based on your use case.
- Setup a Telegram chatbot
- Connect Telegram channel to your bot
- Test your Telegram chatbot
Setup Telegram chatbot
Create a Telegram account
You can create a registered Telegram account using the Telegram app or website.
Navigate to the Telegram app or website. You can either use scan the QR code or Log in by phone number.
Choose the Country, enter Your phone number and click Next.
Enter the verification code that is sent to your device.
This will create your Telegram account and you should be able to see the following screen.
Setup your Telegram bot using BotFather
Navigate to your Telegram account and search for
@BotFather
(Verified Telegram chatbots are marked with a blue check).
You will receive a list of commands that can be used to manage bots.
Enter the command /newbot in the input bar and click send button.
Provide a username for the bot with suffix
bot
. For example, stagingbot, demoBot, and so on.
- It will respond with a congratulations message, indicating that your bot has been created. Along with that, an access token is generated. Copy that access token, paste it on the bot’s Telegram channel integration page, and connect.
Connect Telegram channel to your bot
To connect the Telegram channel on the Yellow.ai platform, follow these steps:
On the left navigation bar, click Extensions.
Click Channels > Messaging > Telegram.
Enter your OAuth token and click Save.
- Your Telegram channel will be successfully connected.
Setup your bot
Set up your bot with the intents to automatically respond to user messages on Telegram.
- Define bot's purpose and scope: First, understand the scope and purpose of your bot (use case). Clearly outline what types of questions or requests the bot should handle based on your intended use case.
- Create Intents: Add the intents that correspond to common questions or requests from users. Within each intent, add the relevant utterances and ensure they are trained to trigger the appropriate flow.note
To trigger the respective flow in the Telegram chatbot, you must add the utterances
START
andstart
and train them accordingly. - Create flows: Design customized conversation flows to manage responses. You can use the nodes such as Name, Question, Email, Phone number, Quick replies, Carousel, Date, Store comment, File prompt, and Input within the flow.
Once you set up the bot, verify whether the bot responds to user according to the defined use case.
Test Telegram chatbot
Once you have connected your bot to Telegram on the Yellow.ai platform, you can start testing your bot on Telegram to verify whether the bot is able to respond to user messages.
To test your bot on Telegram, follow these steps:
Open the Telegram app on your mobile device.
Navigate to BotFather and click on the below-highlighted link to test the bot.
Click START to start the conversation with the bot. Make sure you have already created an intent and added the utterances
START
andstart
to trigger the corresponding flow in your Telegram chatbot.
- The Telegram chatbot will trigger the relevant flow, and you can start interacting with the bot.
- If you have not added the
START
andstart
utterances to your flow, the Telegram chatbot will not trigger the intended flow. Instead, a fallback message will be displayed. - The "START" button is visible only during the initial interaction with the bot.
If a flow is configured for agent reply using the raise ticket node to start a conversation with an agent, it initiates a conversation with the agent. Once a conversation is initiated, the user can talk to the agent.
To view the entire conversation between the live agent and user, navigate to the Inbox module in the platform and select Bot messages in the My Chats section.
- When the conversation between the agent and user ends, the bot takes the conversation forward with the user.