Telegram is a versatile messaging app with a focus on speed and security. It allows users to exchange messages, photos, videos, and files of any type. Users can create channels or groups. It is popular among individuals and businesses.
By using Wiresk to connect Telegram with other applications, you can automate various workflows with flexibility.
With Telegram connected to Wiresk, you can send messages, media and manage users, or groups to public or private channel/group.
You can download the Telegram Desktop app at desktop.telegram.org or use Telegram web https://web.telegram.org.
We recommend utilizing Telegram web since it provides easier access to your telegram settings information.
1 – Wiresk Group system Copy Link
The group system in Wiresk is a way to organize and manage your users and Flows.
When you start with Wiresk(Admin account), you are automatically assigned to the default group. This default group can be renamed.
for users with Pro plan or higher, you can:
- Assign users to specific Flows: Control who has access to and can edit different Flows.
- Organize Flows: Group related Flows together for better management and visibility.
- Manage permissions: Set permissions for different groups, determining who can create, edit, and view Flows.
- Collaborate effectively: Facilitate collaboration among team members by assigning them to appropriate groups.
2 – Connect Telegram Bot to Wiresk Copy Link
A connection to your Telegram Bot is needed so we can sync it with our platform.
There is two ways to connect your app to Wiresk:
- In “My apps” section, where you can manage your connections (select or create your group first to get access to this section, refer to the Group system ).
- While building your Flow, you can easily establish a connection to your app directly within the Flow builder. This can be done during the setup of either a Trigger or a Method.
In this documentation, we will explain how to create a connection in “My apps” section, it is essentially the same as when creating it on-the-go.
A – Add Telegram Bot app in Wiresk Copy Link
On the left panel of Wiresk user interface, go to “My apps” then search “Telegram Bot” in the search field or scroll down the list of apps and choose the Telegram icon.
In the new screen, give a name to your connection, here we will name it “Telegram Bot”.
In the field named “Bot Token”, you need to enter the token from your Telegram Bot. Let’s go to your Telegram account to get this information. Follow the next step “B – Create a Bot in Telegram”.
B – Create a Bot in Telegram Copy Link
Let’s go to your telegram account, then search for BotFather or follow this link https://telegram.me/BotFather.
then in the new chat enter the command “/newbot” or click on “/newbot”.
BotFather will ask you to name your bot, here we will name it “Wiresk_test” then just send the message.
After that, give a username to your bot, here we use “Wiresktest_bot”.
You get a message that your bot has been created successfully and you are given the needed Token.
Now, copy the token and let’s go back to the connection window.
Past it in the field “bot token” then just click on the button “create app” and voila! It’s done, your Telegram app has been added to Wiresk.
C – How to find your Telegram Bot chat ID Copy Link
To use the Telegram Bot Methods:
– First add the Telegram Bot to your Telegram Group/Channel where you want to send the message or interact with
– Promote the bot to admin using either the Telegram Mobile Application or the Telegram Desktop Application.
Add Telegram bot to your Channel or Group: Copy Link
Open your channel or group then go to info settings by clicking on its name > Pen icon to edit.
Scroll down and select “Members”, then click “add members” button > search your telegram bot in “add people” field.
Search your Telegram bot in “add people” field.
Select your bot and click on the “next” button, then click on “ADD” button. Voila, you have added your bot to your telegram Channel or group.
Promote the Telegram Bot to Admin: Copy Link
Like in the previous step “how to add members”, open your channel or group then go to info settings by clicking on its name > Pen icon to edit.
Now, scroll down and select “Administrators”, then click “add Administrators” button > select your bot member you previously added.
In this step you can check the admin permission given to your bot, keep the default permission then click on the “go back” button. Here, you can notice that your bot has been promoted.
Get the Chat ID of your Telegram bot: Copy Link
- Click here: userinfobot or go to your Telegram desktop app then search @userinfobot.
- In the chat, click on Start or send any message.
- Userinfobot will send back a message with your Telegram bot Chat ID.
- Keep it for later use in your Flows.
Get the Chat ID of a Telegram Public channel or Group: Copy Link
Log in to Telegram Web in your browser( To log in using the Telegram Mobile App, go to Settings > Devices > Link Desktop Device and scan the QR code).
Click on the chat of your Telegram Public Channel where you intend to send the message and have included your Telegram bot. Look at the browser URL, you can see your Public channel or group name with “@”,the Chat ID of your Public Channel or Group will be “@name”, in our case it’s “@wiresk”.
Get the Chat ID of a Telegram Private channel or Group: Copy Link
Log in to Telegram Web in your browser( To log in using the Telegram Mobile App, go to Settings > Devices > Link Desktop Device and scan the QR code).
Open the chat of the Telegram Group/Channel where you want to send the message and have added your Telegram bot.
When you click on chat of the Telegram Group/Channel, you can find the Chat ID in the URL. For example, if the URL is web.telegram.org/k/#- 2466415175, then “-2466415175” is the Chat ID of the Telegram Group/Channel.
D – How to find the Telegram Bot Message ID Copy Link
Get your message ID manually: Copy Link
Go to your Telegram Web in your browser (To connect using the Telegram Mobile App, go to Settings > Devices > Link Desktop Device and scan the QR code).
Open a chat from a channel or a group, click right on the message you wish to reply to then select “copy message link”.
If it a public group or channel, you will get a link in this format: https://t.me/Wiresk_public/33
If it’s a private group or channel, you will get this format: https://t.me/c/2466415175/33
In our example, the number “33” is your message ID.
Get your message ID from a previous step in the Flow: Copy Link
You can Map your Message ID or Other fields from a Step response within your Flow.
Add a Method in your Flow, in the configuration screen, click on the message ID input field, then select the Responses tab.
Uncheck “Show recommended” case, then just select the message ID shown by the red arrow. You can repeat these steps to map the other fields.
E – How to find the File ID Copy Link
Messages and files are kept in different locations. A file on the Telegram servers is identified by a file_id
, consisting of a lengthy string of characters like this: AgADBAADZRAxGyhM3FKSE4qKa-RODckQHxsoABDHe0BDC1GzpGACAAEC
.
Get your File ID from forwarding a message: Copy Link
In your Flow, add the Method ” Forward Message“, then forward the message that contain your media, for example, an image.
When you do a Run of your Flow, if succeed, you can notice a green tick icon over your Method icon.
Click on that green icon then find the File ID.
F – How to find other users ID Copy Link
- Open the chat with the user you want to get the user ID from.
- Forward a message of that user to userinfobot (search @userinfobot)
- Userinfobot will send back a message with the user ID.
- Keep it for later use in your Flows.
3 – Telegram Bot Method settings Copy Link
What your automation will do…
A – Add a Method to your Flow Copy Link
The Methods are like mini programs, it will perform a specific task on a particular app or service you’ve connected to Wiresk like get info or send emails.
You can add multiple Methods for complex Flows.
On the Flow builder screen, click on the plus button (+) next to your Trigger, then search or scroll down to select your apps Methods
B – Add Wiresk Tools to your Flow Copy Link
If you want to build a complex Flow, Wiresk offers a selection of tools at your disposal. Refer to Wiresk’s Tools
To add Tools in your Flow, Follow the same step as adding the Methods. On the Flow builder screen, click on the plus button (+) then just click on the “Tool” tab and select the Tool that you want to add.
C – Telegram Bot Method lists and parameters Copy Link
C.1 – Message Copy Link
Forward Message Copy Link
Use case:
Messages from one channel (e.g., a customer support group or order notification) are forwarded to another relevant party (e.g., a sales team group, a manager, or a designated alert channel).
Configuration Table:
Name* | Forward a Message |
Connection* | Select your connection or create one |
Map Fields | |
From Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
From Message ID* | Enter the ID of the original message. You can get it from Mapping the data from a previous Telegram bot Method step or get it manually, refer to “how to get the message ID”. |
Target Chat ID* | Enter or Map the Chat ID of the target chat, see “how to get the chat ID“ |
Protect Content | Protects the contents of the sent message from forwarding and saving |
(*) required field
Send Text Message Copy Link
Messages can include static text or dynamic content (data Mapped from other app integrations).
Configuration Table:
Name* | Send text Message |
Connection* | Select your connection or create one |
Map Fields | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Message* | Enter or map the message text to send. |
Reply to Message | If the message is a reply, enter the ID of the original message. You can get it from Mapping the data from a previous Telegram bot Method step or get it manually, refer to “how to get the message ID”. |
Protect Content | Protects the contents of the sent message from forwarding and saving |
(*) required field
C.2 – Media Copy Link
Sending files
There are three ways to send files (photos, stickers, audio, media, etc.):
If the file is already stored somewhere on the Telegram servers, you don’t need to reupload it: each file object has a file_id field, simply pass this file_id as a parameter instead of uploading. There are no limits for files sent this way.
Provide Telegram with an HTTP URL for the file to be sent. Telegram will download and send the file. 5 MB max size for photos and 20 MB max for other types of content.
Via uploading your own file. 10 MB max size for photos, 50 MB for other files.
Sending by file_id
It is not possible to change the file type when resending by file_id. I.e. a video can’t be sent as a photo, a photo can’t be sent as a document, etc.
It is not possible to resend thumbnails.
Resending a photo by file_id will send all of its sizes.
file_id is unique for each individual bot and can’t be transferred from one bot to another.
file_id uniquely identifies a file, but a file can have different valid file_ids even for the same bot.
Sending by URL
When sending by URL the target file must have the correct MIME type (e.g., audio/mpeg for sendAudio, etc.).
In sendDocument, sending by URL will currently only work for GIF, PDF and ZIP files.
To use sendVoice, the file must have the type audio/ogg and be no more than 1MB in size. 1-20MB voice notes will be sent as files.
Upload local file
Wiresk use Base64 encoding format to transfer files from your computer.
Choose the method send by “File Data” to send files via Base64.
For more details Refer to Base64 encoding documentation.
Download File Copy Link
To download file, you must know its file_id. Refer to “How to find the File ID“
Downloading a file in Telegram is done in 2 steps:
1 – Get file information:
Use the “Download File” Method to get basic information about a file and prepare it for downloading.
On success, a file_path is returned.
2 – Download the file by URL.
Once you have executed the “Download File” Method, you can use the returned file_path to download the file using this URL https://api.telegram.org/file/bot<token>/<file_path>, where <token> must be replaced by your bot token.
This URL will only be valid for 60 minutes, after which it might no longer work. In this situation, you just need to execute the “Download File” Method once more.
The “Download File” Method will only work with files of up to 20 MB in size.
Configuration Table:
Name* | Download File |
Connection* | Select your connection or create one |
Map Fields | |
File ID* | Identifier for this file, which can be used to download or reuse the file |
(*) required field
Send Audio Copy Link
send Voice
Method instead. Voice files are in OGG format and are not shown in the music player. Configuration Table:
Name* | Send Audio |
Connection* | Select your connection or create one |
Map Fields[+Add Field] you can additionally add field: Reply to message Protect Content | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Send By*: File Data: File Name* Extension* Content (base64)* URL*: File Id*(recommended): | Sending method. Upload local file by using Base64 encoding. Name of your file. Extension of your file (e.g. mp3). Copy past the base64-encoded data here. Address URL of your audio file Unique identifier of the audio file that exists on the Telegram servers. |
Caption | Audio caption, 0-1024 characters |
Performer | work only for local audio file |
Title | Track name, work only for local audio file |
Reply to message | Message_id that you want to reply to, from the chat/group/channel. |
Protect content | Protects the contents of the sent message from forwarding and saving. |
(*) required field
Send Document Copy Link
For more details, refer to the Media section: Sending files.
See also Telegram SendDocument API
Configuration Table:
Name* | Send Document |
Connection* | Select your connection or create one |
Map Fields[+Add Field] you can additionally add field: Reply to message Protect Content | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Send By*: File Data: File Name* Extension* Content (base64)* URL*: File Id*(recommended): | Sending method. Upload local file by using Base64 encoding. Name of your file. Extension of your file (e.g. PDF). Copy past the base64-encoded data here. Address URL of your document file Unique identifier of the document file that exists on the Telegram servers. |
Caption | Document caption 0-1024 characters |
Reply to message | Message_id that you want to reply to, from the chat/group/channel. |
Protect content | Protects the contents of the sent message from forwarding and saving. |
(*) required field
Send Invoice Copy Link
In Telegram, all sales of digital goods and services are carried out exclusively in Telegram Stars, for that, you can use the send Invoice methods with the currency field set to “XTR” and the provider_token field left empty.
The provider_token is only needed for sales of physical goods and services, and obtained via @BotFather.
Configuration Table:
Name* | Send invoice |
Connection* | Select your connection or create one |
Map Fields | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Title* | Product name, 1-32 characters |
Description* | Product description, 1-255 characters |
Payload* | Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. |
Provider Token | Payment provider token, let the field empty for payments in Telegram Stars. |
Currency* | Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars. |
Prices[+Element ] Label* Amount* | It represents the breakdown of the cost for the product or service being sold. It allows you to define multiple price c mponents (like the base cost, tax, discounts, etc.) as needed for the invoice. A short description of the cost component (e.g., “Product Price,” “Shipping,” “Tax”). The price amount in the smallest units of the currency (e.g., cents for USD, kopeks for RUB). Example: 2500 (equals $25.00 in USD). |
(*) required field
Connection*Select your connection or create one
Send Media Group (Album) Copy Link
Configuration Table:
Name* | Send Media Group |
Connection* | Select your connection or create one |
Map Fields[+Add Field] you can additionally add field: Reply to message Protect Content | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Media*[+Element ] Send by*: File Data* File Name* Extension* Content (base64)* URL* File Id*(recommended): | Add the media you want to send one by one Sending method Upload local file by using Base64 encoding. Name of your file. Extension of your file (e.g. PDF). Copy past the base64-encoded data here. Address URL of your document file Unique identifier of the document file that exists on the Telegram servers. |
Reply to message | Message_id that you want to reply to, from the chat/group/channel. |
Protect content | Protects the contents of the sent message from forwarding and saving. |
(*) required field
Send Photo Copy Link
Configuration Table:
Name* | Send Photo |
Connection* | Select your connection or create one |
Map Fields[+Add Field] you can additionally add field: Reply to message Protect Content | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Send by*: File Data* File Name* Extension* Content (base64)* URL* File Id*(recommended): | Sending method Upload local file by using Base64 encoding. Name of your file. Extension of your file (e.g. PDF). Copy past the base64-encoded data here. Address URL of your document file Unique identifier of the document file that exists on the Telegram servers. |
Caption | Photo caption (may also be used when resending photos by file_id), 0-1024 characters |
Reply to message | Message_id that you want to reply to, from the chat/group/channel. |
Protect content | Protects the contents of the sent message from forwarding and saving. |
(*) required field
Send Sticker Copy Link
Configuration Table:
Name* | Send Sticker |
Connection* | Select your connection or create one |
Map Fields[+Add Field] you can additionally add field: Reply to Message Protected Content | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Send by*: File Data* File Name* Extension* Content (base64)* URL* File Id*(recommended): | Sending method Upload local file by using Base64 encoding. Name of your file. Extension of your file (e.g. PDF). Copy past the base64-encoded data here. Address URL of your .WEBP; .TGS, or .WEBM sticker, Video and animated stickers can’t be sent via an HTTP URL. Unique identifier of the sticker that exists on the Telegram servers. |
Reply to Message | Message_id that you want to reply to, from the chat/group/channel. |
Protected Content | Protects the contents of the sent message from forwarding and saving. |
(*) required field
Send Video Copy Link
Configuration Table:
Name* | Send Video |
Connection* | Select your connection or create one |
Map Fields[+Add Field] you can additionally add field: Width Height Duration Reply to message Protected Content | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Send by*: File Data* File Name* Extension* Content (base64)* URL* File Id*(recommended): | Sending method Upload local file by using Base64 encoding. Name of your file. Extension of your file (MPG4). Copy past the base64-encoded data here. Address URL of your .MPG4 video Unique identifier of the video that exists on the Telegram servers. |
Caption | Video caption (may also be used when resending videos by file_id), 0-1024 characters |
Width | Video width |
Height | Video height |
Duration | Duration of sent video in seconds |
Reply to message | Message_id that you want to reply to, from the chat/group/channel. |
Protected Content | Protects the contents of the sent message from forwarding and saving. |
(*) required field
Send Video Note Copy Link
You can send a video note only by uploading the video file or reusing the file_id of another video note.
Message Thread ID:
Threads are usually automatically created when replying to any message in a group.
For example, all replies to a message with ID 420 are associated to thread with ID 420
Configuration Table:
Name* | Send Video Note |
Connection* | Select your connection or create one |
Map Fields[+Add Field] you can additionally add field: Video Duration Video Length Message Thread ID Reply to message | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Send by*: File Data* File Name* Extension* Content (base64)* URL* File Id*(recommended): | Sending method Upload local file by using Base64 encoding. Name of your file. Extension of your file (MPG4). Copy past the base64-encoded data here. Address URL of your .MPG4 video Unique identifier of the video that exists on the Telegram servers. |
Protected Content | Protects the contents of the sent message from forwarding and saving. |
Video Duration | Duration of sent video in seconds |
Video Length | Video width and height, i.e. diameter of the video message |
Message Thread ID | Unique identifier for the target message thread (topic) of the forum; for forum supergroups only. refer to Telegram Documentation. |
Reply to Message | Message_id that you want to reply to, from the chat/group/channel. |
(*) required field
Send Voice Copy Link
For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document).
Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
Configuration Table:
Name* | Send Voice |
Connection* | Select your connection or create one |
Map Fields[+Add Field] you can additionally add field: Reply to Message Protect Content Disable Notification | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Send by*: File Data* File Name* Extension* Content (base64)* URL* File Id*(recommended): | Sending method Upload local file by using Base64 encoding Name of your file Extension of your file (MPG4) Copy past the base64-encoded data here Address URL of your .OGG file Unique identifier of the voice message that exists on the Telegram servers. |
Caption | Voice message caption, 0-1024 characters |
Duration | Duration of the voice message in seconds |
Reply to Message | Message_id that you want to reply to, from the chat/group/channel. |
Protect Content | Protects the contents of the sent message from forwarding and saving. |
Disable Notification | Sends the message silently. Users will receive a notification with no sound. |
(*) required field
C.3 – User & Group Copy Link
Ban a Member From the Chat Copy Link
Configuration Table:
Name* | Ban a Member From the Chat |
Connection* | Select your connection or create one |
Map Fields | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
User ID* | Unique identifier of the target user. Refer to “how to find other users ID“ |
Until Date | Date when the user will be unbanned; in Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only. To convert normal date and time to Epoch & Unix Timestamp you can use tools like Epoch Converter |
Revoke Message | True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels. |
(*) required field
Create Chat Invite Link Copy Link
You can Map the generated invite link to another Method with a step response. for example, in the Method “Send a message”, in the Message input field, select responses tab>untick “show recommended”>select invite link.
Configuration Table:
Name* | Create Chat Invite Link |
Connection* | Select your connection or create one |
Map Fields | |
Chat ID* | Enter or Map the Chat ID, see “how to get the chat ID“ |
Invite Link Name | Invite link name; 0-32 characters |
Expire Date | Point in time (Unix timestamp) when the link will expire To convert normal date and time to Epoch & Unix Timestamp you can use tools like Epoch Converter |
Member Limit | The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 |
Join Request | True, if users joining the chat via the link need to be approved by chat administrators. If True, Member Limit can’t be specified |
(*) required field
Get Chat Member Count Copy Link
You can Map the generated member count to another Method with a step response. for example, in the Method “Send a message”, in the Message input field, select responses tab>untick “show recommended”>select count.
Configuration Table:
Name* | Get Chat Member Count |
Connection* | Select your connection or create one |
Map Fields | |
Chat ID* | Enter or Map the Chat ID that you want to count the member from, see “how to get the chat ID“ |
(*) required field
Restrict Chat Member Copy Link
Configuration Table:
Name* | Restrict Chat Member |
Connection* | Select your connection or create one |
Map Fields | |
Chat ID* | Enter or Map the Chat ID that you want to restrict the member from, see “how to get the chat ID“ |
User ID* | Unique identifier of the target user. Refer to “how to find other users ID“ |
Permissions* | Allow or restrict user permissions |
Until Date | Date when restrictions will be lifted for the user; in Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever To convert normal date and time to Epoch & Unix Timestamp you can use tools like Epoch Converter |
(*) required field
4 – How can I prevent my bot from reaching its limits? Copy Link
By default, bots are able to message their users at no cost – but have limitations on the number of messages they can broadcast in a single interval:
- In a single 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.
- In a group, bots are not be able to send more than 20 messages per minute.
- For bulk notifications, bots are not able to broadcast more than about 30 messages per second, unless they enable paid broadcasts to increase the limit.
5 – Test run or automate your Flow Copy Link
After setting up your Flow, you can choose to:
- “Run once”, your Flow will run only a single time. You can use this function to test your Flow. Refer to how to set up an HTTP Trigger, in the Trigger setting step.
- “Run Scheduler” will automate your Flows with the recurrence rule you previously defined.
For more details, refer to How to run a Flow tutorial in our Help Center.
If you are using a Webhook Triggers, the Flow will initiate automatically when a webhook is received from your connected apps. This means that the Flow is automated without a scheduler and will run until you deactivate the Flow manually. Refer to Webhook documentation in our Help Center.
If you need an integration that you cannot find in Wiresk, you can make a request to our team, and we will try our best to satisfy your needs.