This is a basic Slack Bot that:
- Fetches top Hacker News stories
- Filters them based on keywords
- Sends a slack message to a list of users, notifying them of any matches.
Set-up and deployment takes only 5 minutes! With Scheduled Deployments, you can execute the script as often as you'd like.
Want to get started as fast as possible?
- Head to this page and click
Create New App
- Select
From an app manifest
- Copy + paste the manifest file
- Select "Install to Workspace"
- Add in your Slack secrets (found below) to the secrets pane in Repit
- Add your Slack UID (Profile -> three dot menu -> Copy member ID) and keywords to the app.
- Run your Repl (select
Run
at the top of this page) + see what happens!
Secret | Description |
---|---|
SLACK_SIGNING_SECRET |
Your app's "signing secret" can be found on the main app page under Basic Information -> App Credentials -> Signing Secret. |
SLACK_APP_TOKEN |
The app-level token you configured when setting up Socket mode or under Basic Information -> App-Level Tokens -> Token Name. |
SLACK_BOT_TOKEN |
Your app's bot token is in the Installed App Settings tab -> Bot User OAuth Token. |
Add these to your Repl in the Secrets pane (⌘ + K and type "secrets").
Once you have your application configured and tokens set, you can hit Run
(⌘ + Enter) in Replit to execute app.py
.
To have your bot execute on a schedule, head over to "Deployments" (⌘ + K, "deployments") to create a "Scheduled" deployment. This deployment uses cron
syntax to execute the job on a regular cadence.