Skip to content

flows-network/hacker-news-alert-chatgpt-telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hacker News Alert

flows.network Discord flows.network Twitter Create a flow

Having difficulty finding a post of interest among the multitude of Hacker News posts? This Telegram bot can assist you. It monitors Hacker News posts based on your interests and sends you a summary generated by ChatGPT via a Telegram message.

image

How it works

This bot is scheduled to use ChatGPT to summarize Hacker News posts. At the designated time, the bot searches for posts from the previous hour, filters them using your specified keyword, and then sends you a Telegram message containing the summary.

Deploy

  1. Create a bot from the template
  2. Add your OpenAI API key
  3. Configure the Telegram bot to send direct messages (personal chat ID) or group message

0 Prerequisites

1 Create a bot from a template

Go to the Hacker News Alert ChatGPT Telegram template.

image

Review the KEYWORD variable to specify your keyword of interest (supporting only one keyword for each bot).

Click on the Create and Build button.

2 Add your OpenAI API key

Set up the OpenAI integration. Click on Connect, and enter your key. The default key name is Default.

image

Close the tab and go back to the flow.network page once you are done. Finally, click Deploy.

Configure the Telegram bot to send direct messages (personal chat ID) or group message

Set up the Telegram integration. You will need to

  1. Add your Telegram API token, which you can get from @botfather
  2. Add your Telegram Chat ID. The chat ID you use depends on whether you want the bot to send direct messages or group messages. Click here to learn more about finding your Telegram chat ID.
image

Finally, click Deploy.

Wait for the magic!

You are now on the flow details page and the flow function takes a few seconds to build. Once the flow's status changes to running, your bot is set to summarize Hacker News posts.

FAQ

How to customize the bot's scheduled messaging time?

To customize the time the bot sends Telegram messages, modify the value in the cron expression ("30 * * * *"). This expression means the bot sends messages on the 30th minute of every hour.

    schedule_cron_job(String::from("30 * * * *"), keyword, callback).await;

To adjust the timing, you can change the number 30 to your preferred minute. For example, if you want the messages to be sent at the 15th minute of every hour, you can modify the expression to be ("15 * * * *").

By customizing the cron expression, you can set the desired timing for the bot to send Discord messages.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages