Echo Dot (3rd Gen) - Smart speaker with Alexa - Charcoal

Use your voice to play a song, artist, or genre through Amazon Music, Apple Music, Spotify, Pandora, and others. With compatible Echo devices in different rooms, you can fill your whole home with music.

Buy Now

Wireless Rechargeable Battery Powered WiFi Camera.

Wireless Rechargeable Battery Powered WiFi Camera is home security camera system lets you listen in and talk back through the built in speaker and microphone that work directly through your iPhone or Android Mic.

Buy Now

Build a Telegram Bot Scheduler with Python


Image from:

In this post , I will cover how I code a Telegram Bot capable of scheduling appointments with the use of google-calendar-api. The objective of this project is to create a bot to help someone schedule his appointments based on his availability as well as the current time.

It will also be great if you have a basic understanding on Python , HTTP requests as well as a brief understanding on google-calendar-api.

Let’s start by going to Telegram and search for Bot Father. Bot Father is a bot which helps you to create and manage a bot.

Interface of Bot Father


After that enter the name and username of the bot . Your bot is created and an API key will be generated. Now let’s verify the bot and send a message to it.

Type /start followed by test..

Bot Father provides several options to customise the bot such as

But for now we will keep the project simple and just stick to creating a new bot.

Now create a python file called and write the following code.

This will return a json data which contains data/messages that was send to the bot.(if there are no messages send to this bot previously , result will be an empty list).

Now go to google calendar via and click on enable Google Calendar API .

Click on Enable the Google Calendar API

Next download the credential.json and store it in the same directory as your python file . And also run this code in terminal/command prompt to install the relevant modules.

Next copy the and rename it as . Save this python file in the same directory as Hence, this is how the file hierarchy will look like.

After that,you will have to modify the code in to a function that creates an event on google calendar and returns a boolean. True if successfully scheduled and False if unable to schedule.

Now let’s create a function that will prompt user for the service that they want i.e Hair Cut,Trim,Dyeing etc.

This is how it will look on Telegram. An inline-keyboard will be automatically displayed to prompt user for their choice.

Only when a valid option is received, the next step will then be triggered which is to ask user for the time they prefer.

In this code there is a chunk of if statements which modifies the reply according to the current time. For instance , if the current time is 07:15a.m , time slots ranging from 08:00 to 18:00 will be displayed on the inline keyboard.

Only 16:00 and 18:00 will be displayed since the time is 15:59

Next ,we will have to create a function to prompt for the user email as well as verify it using regular expressions.

This is how it should look on Telegram. And now we have to verify that the event is created on Google Calendar.

Go to google-calendar and verify that the event is scheduled. You can customize the duration of the event , description of the event as well as the attendees for the event on

your google calendar

Click the link below for the code for this project. If there are any issues with the code, please contact

Read More


Please enter your comment!
Please enter your name here