TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: I created a telegram bot to notify my website activity

1 点作者 rajasimon超过 2 年前
Hi there,<p>Recently I created a very simple telegram bot to get notification about my embed-blog.com activity. Activities like who signed up to the trial period and who is currently paying and who is created something, etc...<p>These are important metrics I&#x27;ve to know immediatly and Google analytics is not the place to learn it.<p>Setting up this is very easy and it&#x27;s a two step process.<p>1. Create a telegram group and add [@Lognowbot](https:&#x2F;&#x2F;t.me&#x2F;Lognowbot) into it. 2. You receive a chat_id from [@Lognowbot](https:&#x2F;&#x2F;t.me&#x2F;Lognowbot) 3. Send a post message to https:&#x2F;&#x2F;lognowbot-production.up.railway.app&#x2F;forward with chat_id and text you wanted to send. 4. Receive notification<p>i.e) code<p>def notify_telegram(text): payload = { &quot;chat_id&quot;: settings.TELEGRAM_CHAT_ID, &quot;text&quot;: text, } endpoint = &quot;https:&#x2F;&#x2F;lognowbot-production.up.railway.app&#x2F;forward&quot; requests.post(endpoint, json=payload) return True

暂无评论

暂无评论