Telegram
45 min
discover how to connect engini with telegram to automate notifications, build custom bots, and manage real time communication across your workflows getting started with telegram prerequisites a telegram account you can sign up via the telegram mobile app or desktop client the botfather this is the official telegram bot used to create and manage all other bots retrieve your telegram api token open botfather in telegram search for @botfather in your telegram app start a chat initialize the botfather by sending the command /start and follow the instructions create a new bot send the command /newbot follow the instructions to give your bot a name (how users see it) and a username (its unique id, must end in "bot") copy the api token after the bot is created, botfather will provide an http api token this token is required to authorize the connection in engini configure bot privacy (optional) if you plan to use the bot in groups, send /setprivacey to botfather and set it to disabled so the bot can read all messages in the group connecting engini to telegram enter your engini account at https //app engini io https //app engini io/ navigate to connections page by clicking on the connections on the left side bar or by clicking here https //app engini io/connections click on the “new integration” option located at the top bar choose telegram option from the available applications enter the following details in the “add connection” form connection name enter a meaningful name for your connection bot id when you create a new bot , you’ll receive an bot token copy it and paste it into this field save click on the save button to save your connection triggers watch updates this trigger monitors your telegram bot for real time events, such as new messages, edited posts, or member updates, and starts your workflow instantly destination url this is the webhook endpoint where telegram sends all update notifications engini uses this url to ensure that as soon as an event happens in telegram, your workflow is notified without delay add conditions – allows you to set specific rules or filters so the action will trigger only when certain criteria are met select from the drop down the field you want to add the condition on select the condition you want the record to meet click on the empty field and the tooltip will pop up showing the options you can choose you can populate the field in one of the following options\ static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 4 for all the fields you want to populate actions create chat invite link this action generates a new primary or additional invite link for a chat, allowing you to automate how users join your groups or channels chat id enter the unique identifier for the target group or channel add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate note admin rights the bot must be added as an admin to the specific group or channel manage invite links permission the bot must be granted the specific permission "invite users via link" within the group settings to generate links get updates this action pulls the most recent messages and interactions sent to your bot that are waiting in its inbox top n enter the number of updates you want to fetch at once if left empty, engini will retrieve all waiting updates offset set the starting point for your list of updates this helps you skip older messages you have already processed add filters allows you to set specific rules or filters so the action will trigger only when certain criteria are met select from the drop down the field you want to add the condition on select the condition you want the record to meet click on the empty field and the tooltip will pop up showing the options you can choose you can populate the field in one of the following options\ static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 4 for all the fields you want to populate note telegram only stores these updates for 24 hours get chat this action retrieves up to date information about a specific chat, such as the title, description, member count, and current settings chat id enter the unique identifier for the chat you want to inspect this can be the id for a private conversation, a group, or a channel get file this action retrieves basic information about a file, such as its size and download path, allowing you to use it in other parts of your flow file id enter the unique identifier for the file you want to access you can typically find this id in the output data of a trigger like watch updates when a user sends an image, document, or video to your bot get administrators in a chat this action retrieves a list of all users who have management rights in a specific group or channel chat id enter the unique identifier for the chat you want to inspect this can be the id for a private conversation, a group, or a channel get the number of members in a chat this action shows you how many people are currently in a group or channel chat id enter the unique identifier for the chat you want to inspect this can be the id for a private conversation, a group, or a channel get me this action provides basic information about your bot, such as its name, username, and id delete a message this action removes a specific message from a chat, group, or channel chat id enter the unique identifier for the chat where the message is located message id enter the unique id of the specific message you want to remove you can map this id from a previous step in your engini flow delete chat invite link this action deactivates and removes an existing invite link from a group or channel chat id enter the unique identifier for the group or channel where the link was created invite link enter the full url of the invite link you want to delete once deleted, users will no longer be able to join using this specific link pin a message this action sticks a specific message to the top of a chat or channel so it is easily visible to everyone chat id enter the unique identifier for the group or channel where you want to pin the message message id enter the unique id of the message you want to stick to the top add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate note admin rights the bot must be an admin in the group or channel to pin messages pin messages permission the bot must have the specific permission to pin messages enabled in its settings unpin a message this action removes a message from the top of a chat or channel chat id enter the unique identifier for the group or channel where you want to pin the message message id enter the unique id of the message you want to stick to the top add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate note admin rights the bot must be an admin in the group or channel to pin messages un pin messages permission the bot must have the specific permission to unpin messages enabled in its settings send a text message this action sends a written message to a specific person, group, or channel through your bot chat id enter the unique identifier for the chat where the message should be sent text type the message you want to send you can use data from previous steps in your engini flow to make the message dynamic add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate send an audio file use this action to send an audio file (music or voice content) to a specific chat, group, or channel via your telegram bot chat id enter the unique identifier of the destination chat this can be a user, group, or channel id you can also select it dynamically from previous steps file id enter the audio file to send add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate send a document use this action to send a document (any file type such as pdf etc ) to a specific chat, group, or channel via your telegram bot chat id enter the unique identifier of the destination chat this can be a user, group, or channel id you can also select it dynamically from previous steps file id enter the audio file to send add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate send a image use this action to send an image to a specific chat, group, or channel via your telegram bot chat id enter the unique identifier of the destination chat this can be a user, group, or channel id you can also select it dynamically from previous steps file id enter the audio file to send add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate send a sticker use this action to send a sticker to a specific chat, group, or channel via your telegram bot chat id enter the unique identifier of the destination chat this can be a user, group, or channel id you can also select it dynamically from previous steps file id enter the audio file to send add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate send a video use this action to send a video file to a specific chat, group, or channel via your telegram bot chat id enter the unique identifier of the destination chat this can be a user, group, or channel id you can also select it dynamically from previous steps file id enter the audio file to send add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate send a video note use this action to send a video note (round video message) to a specific chat, group, or channel via your telegram bot chat id enter the unique identifier of the destination chat this can be a user, group, or channel id you can also select it dynamically from previous steps file id enter the audio file to send add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate send a voice message use this action to send a voice message (audio optimized for playback as a voice note) to a specific chat, group, or channel via your telegram bot chat id enter the unique identifier of the destination chat this can be a user, group, or channel id you can also select it dynamically from previous steps file id enter the audio file to send add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate send an invoice send api request this activity allows you to send a custom api request directly to telegram's bot base url – this is the root url of the api you’re sending the request to relative url – you can specify additional path segments or parameters that need to be added to the end of the automatically generated url this allows you to customize the specific request you want to perform method – select the http method (e g , get, post, put, delete, patch) body type – defines the format of the data in the body of your request commonly used values include application/json (as shown), which means the body will contain a json formatted payload body – contains any data that is being sent to the server add headers – additional metadata about the request, such as the type of data the engini can accept, the length of the request body, and authentication information click on the “add headers” button to add a header click on the headers field to enter the key, and on the value field to enter a value each header consists of a key value pair, where the key is the name of the parameter, and the value is the data associated with that parameter click on the “add” button to add more headers add queries – the query refers to the parameters or data that are included in the url of an http request to provide additional information or instructions to the server click on the “add queries” button to add a query click on the queries field to enter the key, and on the value field to enter a value each query consists of a key value pair, where the key is the name of the parameter, and the value is the data associated with that parameter click on the “add” button to add more queries update a message caption use this action to update the caption of an existing message (such as a photo, video, or document) sent by your telegram bot chat id enter the unique identifier of the destination chat this can be a user, group, or channel id you can also select it dynamically from previous steps message id enter the identifier of the message you want to update this value usually comes from a previous step (for example, after sending a message) add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate update a chat invite link use this action to edit an existing invite link for a chat (group or channel) managed by your telegram bot chat id enter the unique identifier of the chat where the invite link was created invite link enter the invite link you want to update this must be an existing invite link created by the bot add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate kick a chat member use this action to remove a user from a group, supergroup, or channel via your telegram bot chat id enter the unique identifier of the chat where the user is a member user id enter the unique identifier of the user you want to remove this value usually comes from a previous step (for example, a trigger or user interaction) add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate promote a chat member use this action to make a user an admin in a group, supergroup, or channel using your telegram bot chat id enter the unique identifier of the chat where the user is a member user id enter the unique identifier of the user you want to remove this value usually comes from a previous step (for example, a trigger or user interaction) add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate restrict a chat member use this action to limit what a user can do in a group or supergroup using your telegram bot chat id enter the unique identifier of the chat where the user is a member user id enter the unique identifier of the user you want to remove this value usually comes from a previous step (for example, a trigger or user interaction) add field by clicking the “add field” button, you can choose how to fill in the various fields in the subscriber you are updating you can update one field to the activity or more fields to the activity definitions click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the column types reference) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate