Create a HackerNews Slack bot
Build a bot that scrapes HackerNews and sends updates to Slack. Learn how to use scheduled deployments and integrate with external services.
Learn how to create a bot that monitors HackerNews and sends notifications to Slack. This guide shows you how to use scheduled deployments and external APIs.
What you’ll learn
Web Scraping
Fetch data from HackerNews
Slack Integration
Send notifications to Slack channels
Scheduling
Configure automated deployments
API Usage
Work with external services
Create your bot
Fork the template
Sign in to Replit and fork the HackerNews webscraper template. Select + Use Template and follow the prompts to create your Replit App.
Create a Slack app
- Go to Slack Apps and select Create an App
- Choose From an app manifest
- Select your workspace
- Replace the manifest with this JSON
- Review and select Create
- Select Install the App
You may need administrator approval based on your organization’s policies.
Configure tokens
Add these secrets to your Replit App’s Secrets tab:
-
SLACK_BOT_TOKEN
- Go to Settings > Install App
- Copy the Bot User OAuth Token
-
SLACK_SIGNING_SECRET
- Go to Settings > Basic Information
- Copy the Signing Secret from App Credentials
-
SLACK_APP_TOKEN
- Go to Settings > Basic Information
- Under App-Level Tokens, select Generate Token and Scopes
- Add permissions and generate token
Customize your bot
Update app.py
with your preferences:
Get your Slack member ID from your profile settings under the ellipsis menu.
Deploy with scheduling
Start deployment
Select Deploy in the workspace header.
Configure schedule
- Choose Scheduled Deployments
- Set your preferred schedule
- Select Deploy
Monitor
Your bot will now run automatically according to your schedule.
Customization options
Enhance filtering
- Add more keywords
- Refine matching criteria
- Customize scoring
Improve notifications
- Format messages
- Add rich previews
- Include metadata
Next steps
AI Integration
Add AI summaries to notifications
Deployments
Learn more about scheduling
Databases
Store historical data
Related guides
Create a Slack summarizer
Build a bot that summarizes Slack channels
Build with AI
Create apps using Agent and Assistant
Want to learn more about deployments? Check out our deployment documentation.
Was this page helpful?