Integration Guide: Connecting Your Telegram Bot

A Telegram channel lets your RapidPro.app workspace send and receive messages through a Telegram Bot. To connect Telegram, you’ll create a bot in Telegram (via BotFather), copy the bot token, and paste it into RapidPro.app when adding a new channel. This guide walks you through setup, testing, and the key Telegram rule to keep in mind: contacts must message your bot first (usually with /start) before you can message them.

Introduction: A Telegram channel lets your RapidPro.app workspace send and receive messages through a Telegram Bot. To connect Telegram, you’ll create a bot in Telegram (via BotFather), copy the bot token, and paste it into RapidPro.app when adding a new channel. This guide walks you through setup, testing, and the key Telegram rule to keep in mind: contacts must message your bot first (usually with /start) before you can message them.

Quick setup checklist

Follow these steps to connect Telegram and validate sending + receiving:

  1. Create a Telegram bot in BotFather and copy the token
  2. Add the Telegram channel in RapidPro.app and paste the token
  3. Test inbound and outbound messages using /start
  4. Optional: add a keyword trigger for start to launch onboarding
Step 1
Create a Telegram bot and get your token

  1. Install Telegram and sign in (you’ll need a Telegram account).
  2. Search for BotFather and start a chat.
  3. Send the command /newbot.
  4. Follow the prompts to set:
    • a bot name, and
    • a username (it typically ends with bot).
  5. Copy the authentication token BotFather gives you (you’ll paste it into RapidPro.app).

[CAPTURE: Telegram chat with BotFather showing /newbot flow and the generated token (blurred).]

💡
Tip: BotFather can also help you set a bot profile photo and description—useful for production bots.

Step 2
Add the Telegram channel in RapidPro.app

  1. Open Workspace Settings (gear icon).
  2. Click + New channel.
  3. Select Telegram.
  4. Paste the bot token you copied from BotFather.
  5. Submit/save.

[CAPTURE: Add Channel page with Telegram selected and token field filled (blurred).]

Result: Your Telegram bot is now connected to your workspace.

Step 3
Test inbound and outbound messaging

  1. In Telegram, message your bot with /start.
  2. In RapidPro.app, confirm the inbound message appears in Messages / contact history.
  3. Run a simple flow that replies to the contact and confirm the reply is delivered in Telegram.

[CAPTURE: Messages view showing a Telegram inbound message and an outbound reply.]

⚙️
Technical Detail: Telegram bots typically can’t message brand-new contacts first. A contact must message the bot (often via /start) before you can send them messages from flows or broadcasts.

Step 4
Optional: trigger an onboarding flow when contacts type /start

If you want an automatic onboarding experience, you can start a flow as soon as someone messages your bot with /start.

  1. Create (or open) the onboarding flow you want to run.
  2. Create a keyword trigger for start.
  3. Make sure the trigger applies to the correct Telegram bot/channel you connected.
  4. Test again by sending /start from Telegram.

[CAPTURE: Trigger setup showing keyword “start” mapped to an onboarding flow.]

Common Issues

The bot connects, but inbound messages don’t show up

Fixes:

  • Verify you pasted the correct token (copy it again from BotFather if unsure).
  • Confirm the Telegram channel is enabled in Workspace Settings → Channels.
  • Send a fresh /start message to the bot and check message logs.
I can’t message people who never chatted with the bot

Fix: This is expected. A contact must message the bot first (usually via /start) before you can message them.

My onboarding flow doesn’t start when contacts type /start

Fixes:

  • Ensure you created a keyword trigger for start on the correct flow.
  • Make sure the trigger applies to the Telegram channel/bot you connected.
  • Re-test with a contact that has just sent /start.