Communication
Telegram Bot
28 min
with the telegram bot modules in make, you can edit, forward, delete, pin, and unpin messages, and send text message or replies send audio files, documents, images, albums, photos, stickers, videos, video notes, voice messages, and invoices send media by url or id edit media messages, and message captions download files create, revoke, and edit chat invite links watch, and list updates, and chats kick, promote, and restrict chat members list administrators in a chat retrieve number of members in chat call apis answer inline queries getting started with telegram bot prerequisites a configured bot via telegram app you can download the telegram desktop app at desktop telegram org https //desktop telegram org/ in order to use the telegram app, your mobile phone number has to be provided configuring the telegram bot 1\ go to https //telegram me/botfather https //telegram me/botfather 2\ to create a new bot type /newbot to the message box and press enter 3\ enter the name of the user name of your new bot you have received the message from botfather containing the token , which you can use to connect telegram bot to make to add your bot to your telegram application, click the link in the message from botfather or enter it manually to your browser the link is t me/yourbotname adding telegram bot to your make follow step 1 in the create a scenario docid 4inplgaxo0copid3px2ys article (choose the telegram bot module instead of twitter and facebook module) after the module is added to your make you can then see the https //www integromat com/en/help/scenario editor define what function you need your module to have here you can choose between three types of modules https //www integromat com/en/help/types of modules – triggers, actions, and searches did you know? you can find a lot of sample make templates with telegram bot modules at www make com/en/integrations/telegram https //www make com/en/integrations/telegram messages send a text message or reply sends a text message or a reply to your telegram desktop application false false 189false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type edit a text message edits text or game messages false false 190false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type forward a message forwards messages of any kind this module can be used to forward messages only within telegram false false 184false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type delete a message deletes a message a message can only be deleted if it was sent less than 48 hours ago only a message sent less than 48 hours ago can be deleted false false 179false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type pin a message pins a message false false 178false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type unpin a message unpins a message false false 179false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type media send an audio file sends an audio file to your telegram desktop application false false 177false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type send a document or an image sends a document or an image to your telegram desktop application false false 182false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type send an album sends a group of photos or videos as an album false false 187false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type send a photo sends a photo to your telegram desktop application false false 191false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type send a sticker sends a webp sticker to your telegram desktop application false false 194false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type send a video sends a video file to your telegram desktop application false false 194false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type send a video note as of v4 0, telegram clients support rounded square mp4 videos of up to one minute long use this method to send video messages false false 195false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type send a voice message send a voice message false false 195false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type edit a media message edits photo or video messages false false 204false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type edit a message caption edits a caption of a message false false 207false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type send an invoice sends an invoice false false 206false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type send media by url or id sends a file (document, photo, video, audio, ) by http url or by id that exists on the telegram servers false false 209false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type download a file downloads a file from the telegram server false false 209false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type chats and updates using the following modules, you can create, revoke, and edit chat invite link, lit and watch updates, and list chats create a chat invite link creates an additional invite link for a chat edit a chat invite link edits a non primary invite link created by the bot list updates retrieves a list of updates from the telegram server by default, updates starting with the earliest unconfirmed update are returned if you want to list more, you need to set the offset this module cannot be used with webhooks to use this module, you must switch off and remove all your telegram webhooks list chats list available telegram chats by default, chats starting with the earlier unconfirmed update are returned if you want to list more, you need to set the offset this module cannot be used with webhooks to use this module, you must switch off and remove all your telegram webhooks revoke a chat invite link revokes an invite link created by the bot watch updates triggers when there is a new update from your telegram desktop application the watch updates trigger cannot be combined with the get updates or get chats modules false false 136false left unhandled content type false left unhandled content type members using the following modules, you can list administrators, retrieve members, kick, promote, and restrict chat members list administrators in a chat retrieves a list of administrators from a selected chat get the number of members in a chat use this module to get the number of members in a chat kick a chat member use this method to kick a user from a group, a supergroup, or a channel the bot must be an administrator in the chat for this to work and must have the appropriate admin rights promote a chat member promotes or demotes a user in a supergroup or a channel the bot must be an administrator in the chat for this to work and must have the appropriate admin rights restrict a chat member restricts a user in a supergroup other using the following modules, you can call apis, and answer inline queries make an api call performs an arbitrary authorized api call answer an inline query sends answer to an inline query troubleshooting check the following procedures if you are facing difficulties when using the telegram bot app how to find out the id of a private channel/group one possible way to determine the id of a private channel/group is as follows create a new make place telegram bot >; watch updates module in the make configure the module by creating a webhook execute the make send a message to the private channel/group verify the output of the module by clicking the bubble above the module find the id in the output bundle how to find out the user id to find out the id of a telegram user, forward their message to the userinfobot check out the following procedure for steps on how to do that add the userinfobot to your telegram app you can do that by entering @userinfobot in the search bar and selecting the userinfobot go to the chat with the user you want to retrieve the id from forward his message to userinfobot copy the user id and paste it to the make module adding your bot to the channel click the right mouse button on the channel name and select the view channel info option click the add member icon next to the member number start typing the name of your bot in the search field click on the bot name to select the bot you want to add to the channel click the invite button make the bot admin by clicking the respective button assign the permissions to your bot and click the save button the bot has been added to the channel testing a public channel to test the public channel you need to obtain the chat id the chat id is part of the channel link the channel name is not the channel link / chat id if the public channel link is, for example, t me/imttest , then @imttest is your chat id now, you can send a message to the public channel using the send a text message or a reply module testing a private channel you need to obtain the chat id to test the private channel there are three options to retrieve the id telegram bot docid\ tuaa9g1rdjc4sklzcaygv switch the private channel to the public channel, then retrieve the id (by sending or receiving the message in make) and switch back the channel type to private invite the bot get id bot to your private channel and using the /my id\@get id bot command retrieving the id from the web version of telegram log in to your telegram account via https //web telegram org click on the private channel you want to retrieve the chat id for copy the number between the c letter and the underscore from the url if the url is https //web telegram org/#/im?p=c1424271061 11793697872942794544 then copy the 1424271061 paste the number to the desired field and add the prefix 100 the chat id of the private channel is then 100 1424271061 you can now use the id in the desired telegram bot module in make registration and login it is not required you can sign in on the site, telegram org/auth where you can change your public settings you will receive a key in your desktop application to submit your login my bot is hitting limits, how do i avoid this? when sending messages inside a particular chat, avoid sending more than one message per second we may allow short bursts that go over this limit, but eventually you'll begin receiving 429 errors if you're sending bulk notifications to multiple users, the api will not allow more than 30 messages per second or so consider spreading out notifications over large intervals of 8—12 hours for best results also note that your bot will not be able to send more than 20 messages per minute to the same group (source https //core telegram org/bots/faq#my bot is hitting limits how do i avoid this )