> ## Documentation Index
> Fetch the complete documentation index at: https://docs.landerlab.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up Telegram Integration

> Learn how to connect Telegram to your landing pages in LanderLab and send instant lead notifications to a Telegram chat, group, or channel in real time.

Connect Telegram to your landing pages in LanderLab to get an instant notification every time a new lead comes in. Instead of checking your dashboard, your team sees each lead the moment it is submitted, right inside a Telegram chat, group, or channel.

## What is the Telegram integration?

The Telegram integration uses a Telegram bot to send a message to your chosen chat whenever a lead is collected on your landing page. Every field from the lead is included automatically, so you get the full submission without any setup beyond connecting the integration.

It is a great fit for real-time alerts: notify your sales team in a shared group, send leads to a private channel, or get a personal ping for every new submission.

## Before you start

You need two things to connect Telegram:

1. **A bot token**, created with Telegram's BotFather.
2. **A Chat ID**, which tells the bot where to send notifications (a personal chat, a group, or a channel).

You only create the bot once. After that, you can reuse the same bot to send notifications from as many landing pages as you want.

## Step 1: Create a Telegram bot and get your bot token

Your bot is the account that delivers notifications. You create it through BotFather, Telegram's official bot for managing bots.

<Steps>
  <Step title="Open BotFather in Telegram">
    In the Telegram search bar, type `BotFather` and open the verified account (the one with the blue checkmark and the username `@BotFather`).

    <Frame>
      <img src="https://mintcdn.com/landerlab-babdc23f/9-VOMykPx0hrcjP5/images/botfather.png?fit=max&auto=format&n=9-VOMykPx0hrcjP5&q=85&s=ea65bfd31940bb7d2833927589e1eb7d" alt="Botfather" width="1456" height="829" data-path="images/botfather.png" />
    </Frame>
  </Step>

  <Step title="Start a new bot">
    Click **Start**, then send the command `/newbot`.
  </Step>

  <Step title="Name your bot">
    BotFather will ask for a **name** (the display name, anything you like), then a **username**. The username must be unique and end in `bot` (for example, `LanderLabdoc_Bot`).
  </Step>

  <Step title="Copy your bot token">
    Once the username is accepted, BotFather replies with a confirmation message containing your bot token. It looks like `8911506141:AAHubwnzfc6sa0rVPcMxFr9OIiYmcWcyE54`. Copy it and keep it somewhere safe.

    <Frame>
      <img src="https://mintcdn.com/landerlab-babdc23f/9-VOMykPx0hrcjP5/images/botapi.png?fit=max&auto=format&n=9-VOMykPx0hrcjP5&q=85&s=40bea8773dd6af8e9fd6411bdae12929" alt="Botapi" width="1456" height="829" data-path="images/botapi.png" />
    </Frame>
  </Step>
</Steps>

<Warning>
  Treat your bot token like a password. Anyone who has it can control your bot. Never post it publicly or share it with people you do not trust.
</Warning>

## Step 2: Get your Chat ID

The Chat ID tells the bot exactly where to send notifications. How you find it depends on where you want your leads to go. Pick the option that matches your setup below.

<AccordionGroup>
  <Accordion title="Group chat (recommended for teams)">
    The easiest way to get a group Chat ID is from the Telegram desktop app.

    <Steps>
      <Step title="Create a group and add your bot">
        Create a Telegram group (or open an existing one), then add your bot to it as a member.

        <Frame>
          <img src="https://mintcdn.com/landerlab-babdc23f/9-VOMykPx0hrcjP5/images/botgroup.png?fit=max&auto=format&n=9-VOMykPx0hrcjP5&q=85&s=d6b8b1e180f8daae0f1d1e1e8a77b80e" alt="Botgroup" width="1456" height="820" data-path="images/botgroup.png" />
        </Frame>
      </Step>

      <Step title="Send a message and copy its link">
        Send any message in the group. Then right-click the message (or long-press on mobile) and choose **Copy Message Link**.

        <Frame>
          <img src="https://mintcdn.com/landerlab-babdc23f/6dsdE__B-csyS6Jn/images/copylink.webp?fit=max&auto=format&n=6dsdE__B-csyS6Jn&q=85&s=1a45ce1fd9ad6c51951db3239fccbfa7" alt="Copylink" width="1568" height="768" data-path="images/copylink.webp" />
        </Frame>
      </Step>

      <Step title="Read the Chat ID from the link">
        The copied link looks like `https://t.me/c/4302014071/2`. The number right after `/c/` is your group ID. In this example, the Chat ID is `4302014071`.

        <Frame>
          <img src="https://mintcdn.com/landerlab-babdc23f/6dsdE__B-csyS6Jn/images/groupid.png?fit=max&auto=format&n=6dsdE__B-csyS6Jn&q=85&s=194aa213dd4d7d3ee65dfe5bb5f6ca9b" alt="Groupid" width="1568" height="277" data-path="images/groupid.png" />
        </Frame>
      </Step>
    </Steps>

    <Note>
      If notifications do not arrive with the plain number, prefix the group ID with `-100`. For example, `4302014071` becomes `-1004302014071`. This is the format the Telegram Bot API uses for groups and channels.
    </Note>
  </Accordion>

  <Accordion title="Private chat (just you)">
    Use this when you want personal notifications sent straight to your own Telegram.

    <Steps>
      <Step title="Start your bot">
        Open your new bot and click **Start**, or send it any message.
      </Step>

      <Step title="Open the getUpdates URL">
        In a browser, open the URL below, replacing `<YOUR_BOT_TOKEN>` with your token. Keep the word `bot` directly in front of the token.

        ```text theme={null}
        https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
        ```
      </Step>

      <Step title="Find your Chat ID">
        The page returns a block of JSON. Look for the `chat` object and copy the value of `id`. That number is your Chat ID.

        ```json theme={null}
        "chat": {
          "id": 21xxxxx38,
          "type": "private"
        }
        ```
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="Channel">
    Use this to broadcast leads to a Telegram channel.

    <Steps>
      <Step title="Add your bot as a channel admin">
        Add your bot to the channel and give it admin rights, then post any message in the channel.
      </Step>

      <Step title="Open the getUpdates URL">
        In a browser, open the URL below, replacing `<YOUR_BOT_TOKEN>` with your token.

        ```text theme={null}
        https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
        ```
      </Step>

      <Step title="Find your Chat ID">
        Look for the `chat` object under `channel_post` and copy the value of `id`. Channel IDs start with `-100`.

        ```json theme={null}
        "chat": {
          "id": -1001xxxxxx062,
          "type": "channel"
        }
        ```
      </Step>
    </Steps>
  </Accordion>
</AccordionGroup>

<Tip>
  Seeing an empty result at the `getUpdates` URL? Make sure you have sent at least one message to your bot, group, or channel first. Telegram only returns recent activity.
</Tip>

## Step 3: Connect Telegram in LanderLab

With your bot token and Chat ID ready, you can connect the integration.

### Add the integration

<Steps>
  <Step title="Open your landing page">
    Go to **Landing Pages** and click the **name of the landing page** where you want lead notifications.
  </Step>

  <Step title="Open the Integrations tab">
    Click **Add Integration** to open the integrations panel, then search for **Telegram** and select it.
  </Step>

  <Step title="Enter a name and your bot token">
    Give the integration a **Name** to identify it, then paste your **Bot Token** from Step 1. Click **Add Telegram**.

    <Frame>
      <img src="https://mintcdn.com/landerlab-babdc23f/9-VOMykPx0hrcjP5/images/bot-token.webp?fit=max&auto=format&n=9-VOMykPx0hrcjP5&q=85&s=f8eddbe2a0c4d7c7c4b23e535679460e" alt="Bot Token" width="551" height="317" data-path="images/bot-token.webp" />
    </Frame>
  </Step>
</Steps>

### Configure the notification

After adding the bot, a short setup wizard opens so you can choose where notifications go and how they look.

<Steps>
  <Step title="Enter your Chat ID">
    Paste the **Chat ID** you found in Step 2 (for example, `-1004309994071`). Click **Continue**.

    <Frame>
      <img src="https://mintcdn.com/landerlab-babdc23f/9-VOMykPx0hrcjP5/images/chatid.webp?fit=max&auto=format&n=9-VOMykPx0hrcjP5&q=85&s=632546f1d1b7169a066b71284e43f1c2" alt="Chatid" width="696" height="331" data-path="images/chatid.webp" />
    </Frame>
  </Step>

  <Step title="Choose your message format">
    Pick how each notification is written:

    | Format     | What it does                                                                                                      |
    | :--------- | :---------------------------------------------------------------------------------------------------------------- |
    | **List**   | LanderLab formats every lead field automatically. You only add an **Intro text** shown at the top of the message. |
    | **Custom** | Write your own message template and control exactly what each notification says.                                  |

    For most cases, **List** is the quickest option. Add an intro like `New lead from Pre-Sell Warm-Up Landing Page`, then click **Continue**.

    <Frame>
      <img src="https://mintcdn.com/landerlab-babdc23f/6dsdE__B-csyS6Jn/images/image-27.png?fit=max&auto=format&n=6dsdE__B-csyS6Jn&q=85&s=b6df23cb4f87f08a4771194b23d91fc2" alt="Image" width="912" height="502" data-path="images/image-27.png" />
    </Frame>
  </Step>

  <Step title="Review and connect">
    The final step shows a preview of the destination, message format, and intro text. Every lead field is included automatically. If everything looks correct, click **Connect Telegram**.
  </Step>
</Steps>

<Note>
  If your landing page has multiple A/B test variants, you will be asked to choose which variant or variants this integration applies to before it is added.
</Note>

## Test the integration

Submit a test lead through your landing page form or quiz, then check your Telegram chat. The bot should deliver a message with the lead details within a few seconds.

## Troubleshooting

<AccordionGroup>
  <Accordion title="No notifications are arriving">
    Confirm three things: your bot token is correct, your bot is a member (or admin) of the group or channel, and your Chat ID is entered correctly. For groups and channels, try adding the `-100` prefix to the ID.
  </Accordion>

  <Accordion title="Notifications go to the wrong chat">
    Double-check the Chat ID. It is easy to mix up a group, channel, or personal chat. Repeat Step 2 for the exact destination you want.
  </Accordion>

  <Accordion title="The bot is not responding">
    Make sure you clicked **Start** in the bot chat, or sent at least one message to the group or channel. Telegram will not return any chat data until there is activity.
  </Accordion>
</AccordionGroup>
