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

# Telegram

> Send a message to a Telegram chat on every submission.

<Info>
  Requires a plan with the `webhooks_enabled` feature. Configured per-form from that form's **Webhooks** settings.
</Info>

<Note>
  Telegram is the one provider here that needs **two** pieces of configuration, not one — a bot token *and* a chat ID.
</Note>

## Creating a bot and getting its token

<Steps>
  <Step title="Talk to BotFather">
    In Telegram, message [@BotFather](https://t.me/BotFather) and send `/newbot`. Follow the prompts for a name and username.
  </Step>

  <Step title="Copy the bot token">
    BotFather replies with a token shaped like `123456789:AAF...` — this is what Raykoi uses to send messages as your bot. Anyone with this token can send messages as your bot, so treat it as a secret.
  </Step>
</Steps>

## Getting the chat ID

Where the token identifies *your bot*, the chat ID identifies *where it sends messages* — a group, channel, or your own DM with it.

<Steps>
  <Step title="Get the bot into the conversation">
    For a group: add your bot to the group. For a channel: add it as an administrator. For a DM: send it any message directly.
  </Step>

  <Step title="Find the chat ID">
    Send a message in that chat, then visit `https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates` in a browser — the response includes a `chat.id` field. A group/channel ID is a negative number; a personal DM ID is positive.
  </Step>
</Steps>

## Connecting it to Raykoi

From the form's **Webhooks** settings, choose **Telegram**, and enter both the bot token and the chat ID. Both are required — Raykoi rejects saving with either one missing.

## What the message looks like

Plain text (deliberately not using Telegram's Markdown formatting — its legacy parser rejects an entire message over a single unescaped `_` or unmatched `*`, which would silently break delivery on some real submitted values):

```
New submission on Contact form

email: user@example.com
name: Alice
```

Up to 20 fields shown, message truncated to Telegram's 4096-character limit if a form has a lot of long fields.

## Testing, retries, and signing

Same delivery pipeline as every other integration — see [Webhook](/essentials/integrations/webhook#retries) for retry/auto-disable behavior and the test-send button. Telegram doesn't need Raykoi's own HMAC signing on top — the bot token embedded in the request URL is already the credential that authenticates it.
