Telegram
The Telegram app works through a bot: a Telegram account that Blokkio controls with a token.
1. Create a bot
- In Telegram, open a chat with @BotFather and send
/newbot. - Choose a display name and a username ending in
bot, for exampleacme_alerts_bot. - BotFather replies with a token like
123456789:AAH…. Copy it.
To post into a group, add the bot to the group. To post into a channel, add the bot as an administrator with permission to post messages.
2. Create the connection
- In Blokkio, go to Apps and open Telegram.
- Click Connect, paste the token into Bot token and click Create.
- Test connection calls
getMeand shows Connected — api.telegram.org answered 200.
Telegram puts the token in the request address (https://api.telegram.org/bot<token>/…). Blokkio builds that
address when the request is sent and only sends it to api.telegram.org. Store the token as a
secret with Use secret if several connections or environments share it.
Finding the chat id
Send message needs a Chat ID:
- Public channel: use its username, for example
@acme_news. - Person or group: send the bot a message (in a group, mention it or send
/start@your_bot), then run the Get updates action. The id is atmessage.chat.id(groups have negative ids such as-1001234567890).
Actions
| Action | What it does | Main inputs |
|---|---|---|
| Send message | Sends text | Chat ID, Text (up to 4096 characters), Formatting (HTML, MarkdownV2), Send silently, Disable link preview, Reply to message ID, Topic ID, Keyboard / buttons (JSON) |
| Send photo | Sends a picture | Chat ID, Photo, Caption, Caption formatting, Send silently, Topic ID |
| Send document | Sends any file | Chat ID, Document, Caption, Caption formatting, Send silently, Topic ID |
| Get updates | Messages sent to the bot in the last 24 hours | Offset (last update_id + 1), How many |
| Get bot info | The bot's id and username | None |
Photo and Document accept a file from another block (for example
{{ $nodes.Download.output.file }}, uploaded up to 25 MB), a public https:// URL, or a Telegram file_id.
Get updates doesn't work while the bot has a webhook set elsewhere; Telegram then answers Conflict: can't use getUpdates method while webhook is active.
Troubleshooting
| Message | What to do |
|---|---|
| Unauthorized | The token is wrong or was revoked with /revoke. Paste the current token. |
| Bad Request: chat not found | Wrong chat id, or the person never started a chat with the bot. |
| Forbidden: bot was blocked by the user | The person blocked the bot; they need to unblock it. |
| Bad Request: can't parse entities | The text doesn't match the chosen Formatting; escape special characters or choose HTML. |
| the field 'bot_token' is empty | The connection has no token. Edit it and paste one. |