Sign inSign up

aash591/ztnet-webhook-telegram-bot

By aash591

•Updated almost 2 years ago

Webhook listener for ztnet app, forwarding events to Telegram via a bot.

Image
Networking
Developer tools
0

1.1K

aash591/ztnet-webhook-telegram-bot repository overview

Source code and docker-compose.yml can be found here :https://github.com/aash591/ztnet-webhook-telegram-bot⁠

The ztnet-webhook-telegram-bot listens for webhook events from the ztnet app and sends them as messages to a specified Telegram chat. This setup allows you to run the webhook listener inside a Docker container and easily configure it via environment variables.

Features: • Listens for incoming webhook events. • Sends event data to Telegram via a bot. • Easily configurable through environment variables.

How to Use

  1. Create a Docker Compose File: Use the docker-compose.yml above to set up the webhook listener.
  2. Set Up Environment Variables: o TELEGRAM_BOT_TOKEN: Your Telegram bot token (From Bot father). o TELEGRAM_CHAT_IDS: A comma-separated list of chat IDs where messages will be sent (get ur tg id from : @raw_data_bot).
  3. Run with Docker Compose: Once the docker-compose.yml file is ready, run the following command in the directory containing the file: docker-compose up -d

Notes: • Replace the placeholder values like "Your actual bot token" and "CHAT_ID_1,CHAT_ID_2" with your actual Telegram bot token and chat IDs. • Port 5000 is exposed, allowing webhook events to be sent to this container. • Notes: • Set up your domain (e.g., https://domain.example.com⁠) with Nginx Proxy Manager and ensure it's properly routed to the Docker container running the webhook listener. • Paste the URL https://domain.example.com/webhook⁠ into the ztnet organization's webhook configuration page to direct events to your webhook handler.

Tip: use ur local ip in the domain if u have nat traversal problems

Tag summary

Content type

Image

Digest

sha256:5d39b04b9…

Size

49.9 MB

Last updated

almost 2 years ago

docker pull aash591/ztnet-webhook-telegram-bot