Niles: a simple telegram bot template for Heroku

Niles is a simple NodeJs telegram bot template, designed to run on PaaS (currently only works on Heroku).

Recently I had to deploy some simple telegram bots and, in order to simplify the development and deploy process, i created a simple nodejs template (based on telegraf framework [1]) with a deploy script for heroku.

I dubbed the project Niles, like the butler for the Sheffield family in the sitcom The Nanny: indeed, the first bot created using this template was a simple “personal assistant”.


  • Heroku-Cli installed and configured [3].
  • A telegram bot token [4].

How to use it

First, clone the git repository [2]:

git clone

Then customize the code on index.js and start passing bot token as argument:


When you make changes on code, deploy the changes with a git commit & push:

git commit -am "some code changes" && git push heroku master


  1. Telegraf: Modern Telegram Bot Framework for Node.js
  3. The Heroku CLI | Heroku Dev Center
  4. Bots: An introduction for developers

Related posts