Push Messages from the Command Line to Telegram

Dmitri Popov

Productivity Sauce

Jul 27, 2016 GMT
Dmitri Popov

Besides being an excellent open source messaging app, Telegram has a few clever tricks up its sleeve. This includes support for bots (or accounts operated by software) that can be put to a variety of practical uses. The telegram-sendtool, for example, uses a bot to push notifications and files from the Linux machine to Telegram. To install telegram-send on Ubuntu, run the following commands:

sudo apt install python3-pip
sudo pip3 install telegram-send

Once you've done that, run the sudo telegram-send --configure command, create a new telegram bot, enter its token, and add the generated password.

Now you can push messages and files from your Linux machine to Telegram. To send a message, use the telegram-send "O Hai World" command. Sending files is equally easy: telegram-send --file monkey.jpg. telegram-send conveniently integrates with the default browser, so you can send a file by right-clicking on it and choosing Telegram from the Send To context menu.

comments powered by Disqus

Issue 31: Linux Shell Handbook 9th Ed./Special Editions

Buy this issue as a PDF

Digital Issue: Price $15.99
(incl. VAT)


njobs Europe
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia