Software part:
1. You must install Telegram Bot library for Python
2. Then, open a Terminal and write this following command:
sudo apt-get install python-pip
sudo pip install telepot
Example code:
https://github.com/yonkou23/smart-dustbin-raspi/blob/master/Full_code_Sdustbin.py
Project connection :
| HC-SR04 sensor | Raspberry Pi Zero | 
| VCC | 5V | 
| Trig | GPIO 18 | 
| Echo | GPIO 17 (adding 1k ohm resistor) | 
| GND | GND |