Skip to main content

Task Messaging - Telegram - Send Bot Message​

The Telegram - Send Bot message Task sends a message from a Telegram bot to users who have started a chat with the bot. The Task does not use a Connection: the bot token is entered in the Task. The Task connects to Telegram without a proxy. To create a bot and get its token from BotFather, see Bots: An introduction for developers.

Telegram - Send Bot message tab, Message tab with the Token, Message and Message parse mode fields

warning

The bot token is stored in the Task settings without encryption and is shown as plain text in the Task window, so anyone who can open the Task can read it.

The Main settings, Flow, On error, Conditions and TimeOut tabs are the same for every Task; see Job - Tasks.

Telegram - Send Bot message: Message tab​

  • Token: the token of the bot. Required; Variables are not resolved in it
  • Message: the text to send. Required; Variables are resolved
  • Message parse mode: how Telegram reads the message: "Default" (plain text), "Html", "Markdown" or "MarkdownV2"

The Task cannot be saved while Token or Message is empty.

Telegram - Send Bot message: Recipient(s) tab​

  • Send to all users: sends to every user in the grid, whether or not Use is selected; the grid is then unavailable

    Only the users in the grid when the Task was last saved receive the message. To include users who started a chat with the bot later, click Refresh, then save the Task.

  • The grid: select Use on each user to send to

  • Select all and Deselect all: select or clear Use on every row

  • Refresh: loads the users of the bot into the grid, using Token, and clears every Use check box

Output and errors​

The output of the Task is the response from Telegram. If Telegram rejects the token or the message, the Task fails.

warning

The Task window does not check that a recipient is selected. If no user is selected and Send to all users is cleared, or the grid is empty, nothing is sent, and the Task reports success.

Troubleshooting​

Recipient is not visible​

A user appears on the Recipient(s) tab only after they have started a chat with the bot. Have each user send a message to the bot, then click Refresh.