Telegram app
Send messages, reactions, and polls in Telegram from Attio.
Available on all plans.
Admins can connect Telegram for the workspace.
Once connected, all members can use it in workflows.
Telegram lets your workflows send messages, react to messages, and send polls in any chat your bot has been added to. You can also start a workflow automatically when the bot receives a command, or when someone joins or leaves a chat. For example, a workflow can send a Telegram poll to a deal's project group whenever the deal reaches a certain stage, or post a welcome message when a new teammate joins your Telegram support chat.
Connect Telegram to Attio
Connecting Telegram takes two parts: creating a bot in Telegram, then connecting that bot's token in Attio.
Create a Telegram bot
Telegram issues bot tokens through its own bot, @BotFather. For the official steps, see BotFather.
Open Telegram and start a chat with @BotFather.
Send the command
/newbot.Send a display name when BotFather asks for one.
Send a username when BotFather asks for one. The username must end in "bot," for example
acme_bot.Copy the token BotFather sends you.
Treat this token like a password: anyone who has it can control your bot. The username can't change later, but you can change the display name anytime with /setname. If the token is ever lost or leaked, send /token to BotFather for a new one, then connect the new token in Attio.
Connect your bot in Attio
Click your workspace name, then click Apps and integrations.
Search for and open the Telegram app, then click Install.
Under Workspace connection, click Connect.
Paste your BotFather token into the secret field.
Submit the dialog.
A workspace admin sets up this connection once. Every workflow block then shares that one bot, so there's no separate per-member connection to manage.
Add your bot to the chats you want to use
Telegram doesn't give Attio a way to list your chats, so your bot needs to see a chat before it shows up as an option in a workflow block.
In Telegram, open a chat with your bot, or add it to a group or channel.
In that chat, send the bot a command, such as
/notify.In the Attio workflow block, open the Chat field and select the chat from the list.
Note: Telegram bots run with group privacy mode on by default. In a group, your bot receives commands and replies to its own messages, but not general conversation or a plain @mention in ordinary text. Direct messages to your bot aren't affected. Keep privacy mode on unless your workspace needs the bot to see every group message.
Replace or remove your Telegram connection
Click your workspace name, then click Apps and integrations.
Open the Telegram app, then open the Connections tab.
Click the ⋮ icon next to the connection.
Select Remove connection.
Click Connect again and paste the new token.
Warning: Removing the connection stops every Telegram workflow block from running until an admin connects a new bot token.
Use Telegram blocks in a workflow
Three triggers can start a workflow from Telegram activity, and three steps let a workflow send messages, react to messages, and send polls.
Command received
Command received starts a workflow when your Telegram bot receives a specific command in a specific chat.
Inputs:
Chat (required): The chat to listen in. Select from the list of chats your bot has already seen.
Command (required): The command to listen for, without the leading slash, for example
notify. Matches/notify,/notify@yourbot, and/notifyfollowed by extra words.
Outputs:
Message ID
Chat ID
Chat type (private, group, supergroup, channel, or unknown)
User ID (when available)
Command
Message text (when available)
Received at
The trigger only starts a run for the exact command you enter, and only for messages in the chat you select. It skips any update it's already processed, so retries and Telegram's own resends won't start duplicate runs.
Person joined chat
Starts a workflow when someone joins a Telegram chat your bot is in.
Inputs:
Chat (required): The chat to watch for new members. You can't use a variable for this field.
Outputs:
Chat ID
Chat type
User ID
First name
Last name (when available)
Username (when available)
Joined at
If several people join at once, this trigger reports only the first person Telegram lists, and ignores any bots that join.
Person left chat
Starts a workflow when someone leaves a Telegram chat your bot is in.
Inputs:
Chat (required): The chat to watch for members leaving. You can't use a variable for this field.
Outputs:
Chat ID
Chat type
User ID
First name
Last name (when available)
Username (when available)
Left at
Telegram reports one person leaving at a time, so this trigger doesn't fire for a bulk removal. It also ignores your own bot leaving a chat.
Send message
Sends a message to a chat through your connected bot.
Inputs:
Chat (required): The chat to send the message to.
Message (required): The message text, up to 4,096 characters.
Reply to message ID (optional): Use a variable to bring in a message ID from an earlier step, such as Command received's output, to send this message as a reply. Leave empty to send as a new message.
Outcomes:
Sent: The message was delivered. Outputs the message ID, chat ID, message text, and when it was sent.
If you reply to a message that's since been deleted, the step fails rather than sending the text as a new message.
React to message
Sets an emoji reaction on a Telegram message.
Inputs:
Chat (required): The chat the message is in.
Message ID (required): Use a variable to bring in a message ID from an earlier step, such as Command received's output.
Reaction (required): The emoji to react with, chosen from Telegram's list of bot reaction emoji.
Use big animation (optional): Turn this on to play the larger reaction animation. Off by default. You can't use a variable for this field.
Outcomes:
Reacted: The reaction was set. Outputs the chat ID, message ID, and emoji.
A bot can set only one reaction on a message at a time. [The spec confirms a bot can set only one reaction per message but doesn't say what happens if you run this step again with a different emoji. Assuming the new reaction replaces the old one, matching Telegram's own bot behavior, but this isn't confirmed in the spec.]
Send poll
Sends a poll to a chat through your connected bot.
Inputs:
Chat (required): The chat to send the poll to.
Question (required): The poll question, up to 300 characters.
Options (required): The poll's answer options. Add between 2 and 12.
Poll type (optional): Choose Regular or Quiz (one correct answer). Regular by default. You can't use a variable for this field.
Correct option number (required for quiz polls): The option number, matching Option 1, Option 2, and so on, that's the correct answer. Only shown when Poll type is Quiz. You can't use a variable for this field.
Allow multiple answers (optional): Only shown when Poll type is Regular. Off by default. You can't use a variable for this field.
Anonymous votes (optional): Turn this off to let Telegram show who voted. On by default, matching Telegram's own default. You can't use a variable for this field.
Open for (seconds) (optional): How long the poll stays open, between 5 and 600 seconds. Leave empty to keep it open indefinitely.
Send as already closed (optional): You can't use a variable for this field.
Send silently (optional): Send the poll without a notification sound. You can't use a variable for this field.
Protect content from forwarding and saving (optional): You can't use a variable for this field.
Outcomes:
Sent: The poll was delivered. Outputs the message ID, chat ID, poll ID (when available), question, and when it was sent.
Related resources
Learn more about building a workflow and see all available workflow blocks in the workflow block library.
Frequently asked questions
Your bot's token has probably been revoked or regenerated in Telegram, for example after sending /token to BotFather. Open the Telegram app under Apps and integrations, open the Connections tab, remove the old connection, then connect again with the current token.