Sending Messages to Telegram Channels or Groups
You can use Telegram Bots to send messages to groups, channels, or private chats. By combining this with automations, you can automatically push notifications when events occur, such as system status updates, event reminders, or team updates. This ensures users receive information instantly on the Telegram platform, making it easier to manage events and respond quickly. This guide will walk you through configuring your Telegram bot and setting up the "Send Message to Telegram Chat" automation action.
Here's a step-by-step guide to setting up your Telegram bot with bika.ai.
Configuration Instructions
1. Create a Telegram Bot
To interact with channels or groups, you will need a Telegram bot. Here’s how to create one:
- Open Telegram and search for @BotFather. Make sure you choose the official bot with the handle @BotFather.
- Click Start.
- Type /newbot and follow the instructions to name your bot and set a unique username.
- Copy the bot token provided by BotFather and keep it safe.
Note: Your bot needs to be an admin of the channel or group to post messages. Add it as an admin and grant all necessary permissions.
2. Add the Bot to a Channel or Group
To enable your bot to read and post messages, you need to set it as an admin:
-
Open the target channel or group.
-
Click the three-dot icon in the top right corner and select Manage channel or Manage group.
-
Go to Administrators and click Add administrator.
-
Search for your bot’s name or username, select it, and confirm.
-
Set the permissions (default permissions are usually sufficient) and save.
3. Find the Chat ID
You need the Chat ID to send messages via bika.ai. The Chat ID is the unique identifier of the channel or group. Here’s how to find it:
-
For Public Channels or Groups:
Public channels have a fixed link that you name yourself, such as t.me/yourChannel
. You can find the channel's Chat ID through the link.
-
Click the three-dot icon and select View channel info.
-
In the channel's Link (t.me/yourChannel
), the part after t.me/
is your channel ID, such as ttt_channel332
in the example below. The Chat ID is the channel name prefixed with an "@". In Bika's action configuration, enter @ttt_channel332
.
-
For Private Channels and Groups:
Private channels and groups do not have an easy way to find the Chat ID. You need some basic programming knowledge to obtain the Chat ID through special methods. There are many tutorials online, so please search for the specifics.
4. Configure in the Automation Editor
-
Add a new action in the automation editor.
-
Select the action type "Send Message to Telegram Chat".
-
Fill in the relevant parameters in the configuration interface.
Bot Token: The bot's API token.
Chat ID: The Chat ID of the channel or group.
Parse Mode: Telegram bots support sending messages in plain text, Markdown, or HTML. You can customize message formatting according to Telegram's formatting options.
MarkdownV2
: Supports a range of Markdown syntax, including Telegram-specific extensions.
HTML
: Supports several HTML tags, including Telegram-specific extensions.
Plain
: No parsing mode specified, messages are sent as plain text by default.
Message Content: The message content to be sent. Ensure the syntax is correct, or the message may fail to send. Refer to the formatting options for details.
-
Save and enable the automation.
By following these steps, your Telegram bot will be ready to automate and simplify your workflow with bika.ai.