Skip to content
Docs

Telegram step: send a message through your bot

Send a message to a Telegram chat, group or channel through a bot token from @BotFather. How to set up the bot, find the chat ID, and the step's limits.

Updated

Send a Telegram message sends a message to a Telegram chat, group or channel through a bot you create in Telegram.

How to set it up

  1. In Telegram, message @BotFather and send /newbot (or /mybots → API Token for a bot you already have). Copy the token: it looks like 123456789:ABC….
  2. In Foliot, add a Telegram bot under Connections and paste the token. Foliot asks Telegram who the bot is before saving, so a mistyped token is refused there. It's stored encrypted. If the token is revoked later, the connection shows Needs reconnecting, you get one email, and Replace bot token takes the new one without touching your steps.
  3. Put the bot where it should post: add it to the group, make it an admin of the channel, or open a chat with it and press Start. A bot can only message chats it's in.
  4. Add a Send a Telegram message step, choose the bot and enter the Chat ID: your own ID from @userinfobot, a group's from @getidsbot (it starts with a minus), or a public channel's @name. Write the Message, inserting data with + Data.
  5. Test this step sends a real message.

Formatting

Messages are sent as plain text. Under More options, Formatting can be Markdown (*bold*, _italic_, [links](https://…)) or HTML (<b>, <i>, <a href>). Telegram then refuses a message with a stray *, _ or <, including one that arrives in your data, so keep plain text unless you need the styling.

Limits

  • Up to 4,096 characters per message, Telegram's own limit.
  • Text only: no photos, files or buttons.
  • It only sends. Foliot can't read Telegram messages or reply to commands.
  • When Telegram is rate limiting, or can't be reached at all, the step is retried after 30 seconds, 2 minutes and 10 minutes. After a timeout or a Telegram server error the message may already be there, so the step fails and asks you to check Telegram instead of sending it twice.