Skip to main content

Telegram integration

Send messages and react to chat updates with a Telegram bot on behalf of your clients.

What it does

The Telegram integration lets your workflows send messages, edit messages, and share files through a Telegram bot, and react in real time when that bot receives a chat update. Each client connects their own bot, so the messages your automations send come from their brand and you can revoke access per client without touching anyone else's setup.

Connect a Telegram account

You authenticate with a bot token. To create one, open a chat with @BotFather in Telegram, send /newbot, and follow the prompts. BotFather returns a token in the form 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11. Paste that token into the connection form.

Use a separate bot per client so revocation stays scoped. You can revoke a token at any time from BotFather with /revoke, which immediately invalidates the connection without affecting your other clients.

To receive the Message received trigger, register your TaskJuice webhook URL with Telegram using setWebhook, and set a secret_token on that call. Telegram sends that token back on every update in the X-Telegram-Bot-Api-Secret-Token header, which TaskJuice verifies before accepting the update.

Triggers

  • telegram/message-received — fires when the bot receives an incoming update, one workflow run per update.

Actions

  • telegram/get-me — fetch the bot's profile to verify the connection.
  • telegram/send-message — send a text message to a chat.
  • telegram/edit-message-text — edit the text of a message the bot already sent.
  • telegram/send-photo — send a photo to a chat as an uploaded file.
  • telegram/send-document — send a general file to a chat as an uploaded file.

Known limitations

  • Telegram rate-limits bots to roughly 30 messages per second overall and about one message per second to a given chat. When you hit a limit, Telegram returns 429; TaskJuice retries with backoff, though it does not yet honor Telegram's exact retry_after body hint.
  • The bot can only message users who have started a chat with it, and it can only edit messages it sent itself.
  • File uploads are subject to Telegram's size ceilings (50 MB for documents sent by bots, 10 MB for photos).
Was this helpful?