{"id":51318601,"url":"https://github.com/jedbillyb/posthog-notify","last_synced_at":"2026-07-01T10:31:26.274Z","repository":{"id":358388880,"uuid":"1216942480","full_name":"jedbillyb/posthog-notify","owner":"jedbillyb","description":"FastAPI webhook receiver that forwards PostHog events to Telegram","archived":false,"fork":false,"pushed_at":"2026-06-04T09:52:36.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-04T11:13:23.429Z","etag":null,"topics":["fastapi","notifications","posthog","python","self-hosted","systemd","telegram","vps","webhook"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jedbillyb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T11:41:24.000Z","updated_at":"2026-06-04T09:55:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jedbillyb/posthog-notify","commit_stats":null,"previous_names":["jedbillyb/posthog-notify"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jedbillyb/posthog-notify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedbillyb%2Fposthog-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedbillyb%2Fposthog-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedbillyb%2Fposthog-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedbillyb%2Fposthog-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedbillyb","download_url":"https://codeload.github.com/jedbillyb/posthog-notify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedbillyb%2Fposthog-notify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35003452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","notifications","posthog","python","self-hosted","systemd","telegram","vps","webhook"],"created_at":"2026-07-01T10:31:25.394Z","updated_at":"2026-07-01T10:31:26.259Z","avatar_url":"https://github.com/jedbillyb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"right\"\u003e\u003ca href=\"https://jedbillyb.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/jedbillyb.com-000?style=for-the-badge\u0026logo=archlinux\u0026logoColor=blue\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n\n# posthog-telegram\n\n**Forwards PostHog webhook events to Telegram in real-time.**\n\n[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](./LICENSE)\n[![Python](https://img.shields.io/badge/Python-3.10+-3776ab?style=flat-square\u0026logo=python)](https://www.python.org)\n[![PostHog](https://img.shields.io/badge/PostHog-Webhooks-f54e00?style=flat-square)](https://posthog.com)\n\n\u003c/div\u003e\n\n---\n\nA lightweight FastAPI webhook receiver. PostHog pushes events to `/posthog`, the service filters noise, extracts key properties, and fires a formatted message to Telegram. Designed to run as a systemd service on a VPS.\n\n## Features\n\n- **Webhook-driven** — Zero polling; PostHog pushes events instantly\n- **Noise filtering** — Configurable `SKIP_EVENTS` set drops web vitals, autocapture, and other noise\n- **Rich formatting** — Site label, event name, timestamp, location, URL, and device info per message\n- **vehiclefinder-aware** — Extracts `make`, `model`, and `year` for vehicle search events\n- **Fuzzy property matching** — Handles inconsistent PostHog key casing and formatting automatically\n\n## Stack\n\n| Layer | Tech |\n|---|---|\n| Language | Python 3.10+ |\n| Web framework | FastAPI |\n| HTTP client | requests |\n| APIs | PostHog Webhooks, Telegram Bot API |\n| Process management | systemd |\n| Config | `.env` via `python-dotenv` |\n\n## Getting Started\n\n```bash\ngit clone https://github.com/jedbillyb/posthog-telegram.git\ncd posthog-telegram\npython3 -m venv venv\nvenv/bin/pip install -r requirements.txt\ncp .env.example .env\n```\n\nFill in `.env`:\n\n```env\nTELEGRAM_BOT_TOKEN=...\nTELEGRAM_CHAT_ID=...\n```\n\n**Getting your Telegram chat ID:** message your bot, then visit `https://api.telegram.org/bot\u003cTOKEN\u003e/getUpdates`.\n\nRun locally:\n\n```bash\nvenv/bin/uvicorn main:app --host 0.0.0.0 --port 8000\n```\n\n### PostHog setup\n\nIn PostHog → **Project Settings** → **Webhooks**, add your endpoint:\n\n```\nhttps://your-domain.com/posthog\n```\n\n## Deployment\n\nCopy to your VPS and install the systemd service:\n\n```bash\nscp -r . ubuntu@server.jedbillyb.com:/opt/posthog-telegram\nssh ubuntu@server.jedbillyb.com\n\ncd /opt/posthog-telegram\npython3 -m venv venv\nvenv/bin/pip install -r requirements.txt\nnano .env  # fill in your keys\n\nsudo cp posthog-telegram.service /etc/systemd/system/\nsudo systemctl daemon-reload\nsudo systemctl enable --now posthog-telegram\nsudo journalctl -u posthog-telegram -f\n```\n\nThe service must be reachable from the internet — proxy it through nginx or Caddy on your VPS.\n\n## Message Format\n\n```\nVF · Pageview  14:32:01 UTC\nabc12345…  ·  Auckland, New Zealand\n/stats/toyota?make=toyota\nChrome  ·  Mac OS X\n```\n\nFor vehicle search events, a vehicle line is prepended:\n\n```\nVF · Pageview  14:32:01 UTC\n2018 Toyota Corolla\nabc12345…  ·  Wellington, New Zealand\n/search\nChrome  ·  Windows\n```\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\u003csub\u003eMIT © \u003ca href=\"https://github.com/jedbillyb\"\u003ejedbillyb\u003c/a\u003e · Made with ❤️\u003c/sub\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedbillyb%2Fposthog-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedbillyb%2Fposthog-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedbillyb%2Fposthog-notify/lists"}