Blog ·
A Telegram bot for business: what it can do and what the cost depends on
A Telegram bot answers people and does work on a schedule. Here is which tasks are worth handing to it and what affects the price.
What a Telegram bot can do
A bot replies to messages and runs tasks by itself on a schedule. These are the usual jobs for it:
- take a request or a booking and pass it to a member of staff;
- answer frequent questions without an operator;
- watch sources and send new items to a channel;
- download a file, convert it and send it out;
- send a reminder or a daily summary.
A bot suits actions that repeat the same way many times. When a live conversation is needed, the bot takes the request and hands it to a person.
An example: a bot that gathers podcasts
Our Podcast Bot runs by itself. It watches RSS feeds, YouTube channels and playlists, and Telegram channels. When a new episode comes out, the bot does the following:
- downloads the episode;
- converts the audio to MP3;
- prepares a normal version and a double-speed one;
- splits files that are too large into parts;
- sends everything to a channel and deletes temporary files.
Sources are checked on a schedule. You can also send the bot a link and it will queue it for processing. The state of every episode is written to a database, so the bot knows what has been sent and what is still waiting.
What a bot is made of
We write the bot's code in Python with the aiogram library. Next to the code runs a database that keeps what has been done and what is in the queue. SQLite is enough for small bots.
A bot has to run around the clock, so it needs a server. We run bots in Docker, which makes them easier to move and restart.
If a bot takes payments, writes to a spreadsheet or a CRM, or calls an AI model, those external services are connected to it.
What the cost depends on
The price is set by the number of scenarios and connections to other systems.
- How many scenarios there are. Answering three questions is simpler than walking a person through a booking with a choice of time.
- How many integrations there are. Every connection to payments, a CRM or a spreadsheet needs its own work and testing.
- Whether the bot handles files. Audio, video and large files have to be processed and stored somewhere.
- Whether an admin panel is needed to change texts and settings without a developer.
- What the load is. A bot for a hundred thousand people is more complex than a bot for a hundred.
After launch there are costs for a server and maintenance. The platforms a bot works with change their rules, and the code has to be updated.
How to tell whether you need a bot
Count how many times a week you or your staff do the same action in the same way. If it can be described as "when this happens, do that", it can be handed to a bot. Start with one such action.