This is a container that allows you to create a Telegram Bot that communicates with various service APIs and responds back in Telegram. The services are aimed at those services that can be selfhosted, with APIs that can provide life with value.
This is a personal project which I know could be written better, but I needed something quick and dirty to provide a better means of finding out information quickly. I will slowly be building on this to provide more commands, better written code, and maybe even tests! The project is written in PHP as that is my preferred choice of language.
The functionality of the services are limited by the API that it has to offer. We are at the mercy of the API to work with these services. I tend to regularly update these services via my docker so you can assume it supports the latest version of these services and older versions may not be supported. Your mileage may vary.
This connects to your personal CRM.
Commands available:
/reminders
- To provide you with a list of all reminders./birthdays
- To provide you with a list of today's, belated, upcoming birthdays.
This connects to the ERP for your Home.
Commands available:
/chores
- To provide you with a list of chores.
You may run php index.php
with the necessary environment variables in place but it is recommended to use
docker-compose to get started.
Ensure you create your bot using @BotFather.
Use the wizard to create commands based on the services you wish to connect.
Find your chat ID by using the @IDBot. Add this bot to your group to the group's chat ID.
telegram-bot:
image: ghcr.io/chevli/telegram-bot
container_name: telegram-bot
restart: unless-stopped
environment:
- telegram_chat_id=<TELEGRAM CHAT ID>
- telegram_token=<TELEGRAM TOKEN>
- monica_url=<your MonicaHQ URL>/api/
- monica_token=<your MonicaHQ token>
- grocy_url=<your Grocy URL>/api/
- grocy_api_key=<your grocy API key>