Oct 2026 · 7 min read

Backend, OSINT, Python

TeleUserBot: from Telegram ingest to digest in one pipeline

Telegram groups are the best early signal source for news and the worst for reading. TeleUserBot is my answer: a userbot that ingests, dedupes, routes by severity, and produces digests.

The problem

A security or OSINT group posts 200 messages a day. Fifteen matter. The rest is noise, duplicates, and forwards of forwards. By the time you read the important one, it is six hours old.

The pipeline

  • Ingest via Telethon from public and private groups you are in.
  • Dedupe by URL and fuzzy title match. Most groups post the same story five ways.
  • Route by severity keywords and source reliability, not just volume.
  • Digest once an hour. OCR extracts text from screenshots and infographics.
  • Query assistant answers across the archive. Ask what was posted about a CVE last week, get the posts.

What I learned

The OCR step was the sneaky one. Half the valuable content was in images. Running OCR at ingest time, not at query time, kept the assistant fast.

The repo lives under therayyanawaz/TeleUserBot on GitHub.

The soul becomes dyed with the color of its thoughts.

Marcus Aurelius

Made with <3 and lots of coffee.