wgtechlabs/unthread-telegram-bot

Sponsored OSS

By WG Technology Labs

Updated about 2 months ago

Turn private Telegram groups into real-time support ticket hubs — powered by Unthread.io. 🎫🤖

Image
Integration & delivery
0

10K+

wgtechlabs/unthread-telegram-bot repository overview

Unthread Telegram Bot

Official Unthread extension for Telegram support via dedicated customer and partner group chats.

This integration does three core things:

  • Converts inbound Telegram support requests into Unthread conversations
  • Sends agent replies from Unthread back to Telegram in real-time
  • Sends automatic ticket status updates between Unthread and Telegram

How It Works

Customer (Telegram Group) -> Bot -> Unthread
|
Agent (Unthread) <- Webhook Server <- Redis Queue <- Bot

  • Inbound path: Telegram users create tickets using /support, then the bot resolves or creates customer, user, and conversation in Unthread.
  • Outbound path: unthread-webhook-server pushes Unthread events to Redis, then this bot forwards replies, status updates, and attachments back to Telegram.

Docker Quick Start

docker compose up -d
docker compose logs -f server

Reset local data:

docker compose down -v && docker compose up -d

Required Variables

VariablePurpose
TELEGRAM_BOT_TOKENTelegram bot token from BotFather
ADMIN_USERSTelegram user ID(s) allowed to configure and manage bot setup
UNTHREAD_API_KEYUnthread API key
UNTHREAD_SLACK_CHANNEL_IDUnthread target channel ID
UNTHREAD_WEBHOOK_SECRETWebhook secret used in Unthread integration
SLACK_TEAM_IDSlack workspace/team ID required for attachment download compatibility
POSTGRES_URLPostgreSQL connection string
WEBHOOK_REDIS_URLRedis connection for webhook queue processing
PLATFORM_REDIS_URLRedis connection for bot state and platform cache

Important Optional Variables

VariableDefaultNotes
BOT_USERNAMEemptyRecommended for faster deep-link and command resolution
MY_COMPANY_NAMEemptyCompany name used for attribution/routing context
DUMMY_EMAIL_DOMAINtelegram.userDomain for auto-generated fallback emails
LOG_LEVELinfoSet to debug for detailed troubleshooting logs
VERBOSE_LOGGINGfalseEnables verbose webhook and processing logs
DATABASE_SSL_VALIDATEtrueSet false for local Docker/PostgreSQL development only

Endpoints

MethodPathPurpose
N/AN/ABot runtime is queue-driven and does not expose a primary public API surface
ExternalManaged by unthread-webhook-serverReceives Unthread webhook events and enqueues bot work

Prerequisites

  • Telegram bot token from BotFather
  • Telegram user ID from userinfobot (for admin setup access)
  • Unthread API key and channel ID
  • PostgreSQL
  • Redis (platform cache and webhook queue)
  • Docker and Docker Compose for containerized deployment

Licensed under GNU GPL v3.0.

Tag summary

Content type

Image

Digest

sha256:9b4f5fc29

Size

63 MB

Last updated

about 2 months ago

docker pull wgtechlabs/unthread-telegram-bot:staging

This week's pulls

Pulls:

838

Last week