Telegram

Dialogflow Telegram Integration allows you to easily create Telegram bots with natural language understanding based on the Dialogflow technology.

Setting Up Telegram

In order to set up the Telegram integration for your agent, you'll need the following:

Creating a Bot in Telegram

  1. Login to Telegram and go to https://telegram.me/botfather
  2. Click the Start button in the web interface or type /start
  3. Click on or type /newbot and enter a name
  4. Enter a username for the bot, ending in "bot" (e.g. garthsweatherbot)
  5. Copy the generated access token

Setting Up Dialogflow

  1. In Dialogflow, go to Integrations in the left hand menu
  2. Click on the Telegram tile
  3. Paste the Access Token into the related field
  4. Click the Start button

Testing

BotFather will provide a link to your bot once you've completed the setup. Go to this link to test out your agent.

Regenerating Telegram Token

To regenerate the Telegram token for an agent with Telegram integration enabled, do the following:

  1. Go to the Dialogflow integration settings and click STOP.
  2. Regenerate the token in Telegram.
  3. Enter the new Telegram token in the integration settings and click START.

Integrating Agent with a New Telegram Bot

For an agent with Telegram integration enabled, to link it to a new Telegram bot, do the following:

  1. Go to the Dialogflow integration settings and click STOP.
  2. Delete the old bot in Telegram if needed.
  3. Enter the new Telegram token in the integration settings and click START.

Events

The following events are triggered by this integration:

Event Description
TELEGRAM_WELCOME Triggered when a user starts a conversation with your Telegram bot or types /start.
TELEGRAM_HELP Triggered when a user inputs /help while conversing with your Telegram bot.
TELEGRAM_SETTINGS Triggered when a user inputs /settings while conversing with your Telegram bot.
Was this page helpful? Let us know how we did:

Send feedback about...

Dialogflow Documentation
Need help? Visit our support page.