A bot that notifies you on Slack whenever your company/product is mentioned on Hacker News.
/api/cron
endpoint once every 60 seconds.lastCheckedId
) and the list of keywords
to check against from Upstash.latestPostId
using HN API's maxitem
endpoint. Then, perform checks against each post between lastCheckedId
and latestPostId
to see if they contain any of the delineated keywords
.chat.postMessage
method.link_shared
event at our /api/event
endpoint. Once an event occurs, send a POST request to Slack to unfurl the link using the chat.unfurl method.Here's a 60s video that walks you through the installation process, step-by-step.
You can click the button below to install the bot directly into your desired Slack workspace:
Once it's installed, create a channel to receive notifications in and start configuring the bot with the /configure
command.
You can also deploy your own version of this bot using Vercel and Upstash. Note that while this is in early-access, some of these processes might change.
Prefer a video tutorial instead? Watch this video.
Hacker News Bot
as the name of your app.NEXT_PUBLIC_SLACK_CLIENT_ID
env var.SLACK_SIGNING_SECRET
env var.SLACK_VERIFICATION_TOKEN
env var.Go to console.upstash.com and create an account. You'll need it for the next step.
You can deploy your bot to Vercel with one-click:
Be sure to include all 5 of the env vars above in your deployment.
When the project finishes deploying, get your project's domain (e.g. https://slacker-eight.vercel.app/
). You'll need it for the next step.
For your Slack app to be able to send/unfurl messages in your Slack workspace, we will need to configure a few things:
Step 4A: Configuring OAuth ScopesFrom your Slack app home screen, select "OAuth & Permissions" from the sidebar (under "Features").
Scroll down to "Scopes", and add the following scopes under "Bot Token Scopes":
chat:write
chat:write.public
links:read
links:write
/api/event
to it. The final URL should look something like https://slacker-eight.vercel.app/api/event
.link_shared
bot user event.news.ycombinator.com
.
Select "Slash Commands" from the sidebar (under "Features"). Create the following commmand with its respective Request URLs (based on your Vercel project's domain):
/configure
https://[YOUR_VERCEL_PROJECT_DOMAIN]/api/cmd/configure
/api/response
to it. The final URL should look something like https://slacker-eight.vercel.app/api/response
.SLACK_OAUTH_TOKEN
env var in your Vercel project. Here's a guide on how to do that.This project was originally created by Steven Tey at Vercel, with contributions/feedback from:
The MIT License.
A bot that notifies you on Slack whenever your company/product is mentioned on Hacker News.
/api/cron
endpoint once every 60 seconds.lastCheckedId
) and the list of keywords
to check against from Upstash.latestPostId
using HN API's maxitem
endpoint. Then, perform checks against each post between lastCheckedId
and latestPostId
to see if they contain any of the delineated keywords
.chat.postMessage
method.link_shared
event at our /api/event
endpoint. Once an event occurs, send a POST request to Slack to unfurl the link using the chat.unfurl method.Here's a 60s video that walks you through the installation process, step-by-step.
You can click the button below to install the bot directly into your desired Slack workspace:
Once it's installed, create a channel to receive notifications in and start configuring the bot with the /configure
command.
You can also deploy your own version of this bot using Vercel and Upstash. Note that while this is in early-access, some of these processes might change.
Prefer a video tutorial instead? Watch this video.
Hacker News Bot
as the name of your app.NEXT_PUBLIC_SLACK_CLIENT_ID
env var.SLACK_SIGNING_SECRET
env var.SLACK_VERIFICATION_TOKEN
env var.Go to console.upstash.com and create an account. You'll need it for the next step.
You can deploy your bot to Vercel with one-click:
Be sure to include all 5 of the env vars above in your deployment.
When the project finishes deploying, get your project's domain (e.g. https://slacker-eight.vercel.app/
). You'll need it for the next step.
For your Slack app to be able to send/unfurl messages in your Slack workspace, we will need to configure a few things:
Step 4A: Configuring OAuth ScopesFrom your Slack app home screen, select "OAuth & Permissions" from the sidebar (under "Features").
Scroll down to "Scopes", and add the following scopes under "Bot Token Scopes":
chat:write
chat:write.public
links:read
links:write
/api/event
to it. The final URL should look something like https://slacker-eight.vercel.app/api/event
.link_shared
bot user event.news.ycombinator.com
.
Select "Slash Commands" from the sidebar (under "Features"). Create the following commmand with its respective Request URLs (based on your Vercel project's domain):
/configure
https://[YOUR_VERCEL_PROJECT_DOMAIN]/api/cmd/configure
/api/response
to it. The final URL should look something like https://slacker-eight.vercel.app/api/response
.SLACK_OAUTH_TOKEN
env var in your Vercel project. Here's a guide on how to do that.This project was originally created by Steven Tey at Vercel, with contributions/feedback from:
The MIT License.