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

# Telegram connector

> Set up the Telegram connector in Collabase Automation: API Key authentication, 3 triggers such as Message Received and 9 actions such as Send Message.

Send text, photos, documents, interactive inline keyboards, and location pins to Telegram users and groups. Edit sent messages, pin important ones, and handle button callback queries.

## Authentication

**Auth type:** API Key

Create a bot via [@BotFather](https://t.me/BotFather) on Telegram using `/newbot`.

| Credential    | Description                                                                 |
| ------------- | --------------------------------------------------------------------------- |
| **Bot Token** | Token from @BotFather (e.g. `110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw`) |

## Triggers

| Trigger              | When it fires                           |
| -------------------- | --------------------------------------- |
| **Message Received** | A user sends a message to the bot       |
| **Command Received** | A user sends a `/command` to the bot    |
| **Callback Query**   | A user clicks an inline keyboard button |

## Actions

| Action                    | Key inputs                                                   | Key outputs                  |
| ------------------------- | ------------------------------------------------------------ | ---------------------------- |
| **Send Message**          | `chatId`, `text`, `parseMode` (Markdown/HTML), `replyMarkup` | messageId, chatId            |
| **Send Photo**            | `chatId`, `photoUrl`, `caption`                              | messageId                    |
| **Send Document**         | `chatId`, `documentUrl`, `caption`                           | messageId                    |
| **Send Inline Keyboard**  | `chatId`, `text`, `buttons[]` (label + callbackData)         | messageId                    |
| **Edit Message**          | `chatId`, `messageId`, `text`                                | ok                           |
| **Delete Message**        | `chatId`, `messageId`                                        | ok                           |
| **Pin Message**           | `chatId`, `messageId`, `disableNotification`                 | ok                           |
| **Answer Callback Query** | `callbackQueryId`, `text`, `showAlert`                       | success                      |
| **Get Chat**              | `chatId`                                                     | id, title, type, memberCount |

<Tip>
  Use `parseMode: "HTML"` for formatting: `<b>bold</b>`, `<i>italic</i>`, `<code>code</code>`. HTML is more reliable than Markdown when messages contain special characters like `.`, `!`, or `-`.
</Tip>
