twitter-slack-stream
v1.0.2
Published
Stream tweets to Slack with the greatest of ease!
Downloads
8
Readme
twitter-slack-stream
Stream tweets to Slack with the greatest of ease!
About
This was created as an easy way to monitor tweets containing specific keywords from a Slack channel in realtime.
It's been designed to be super easy to deploy via Heroku.
You can deploy it anywhere Node.js is installed.
Requirements
- Twitter application
- Incoming Slack webhook
- Keyword to search on Twitter
- Slack channel to stream tweets into
Configuration
- Head to apps.twitter.com
- Create a new application
- Give it whatever name/description you like
- Callback URL doesn't matter and can be blank
- Navigate to the "Keys and Access Tokens" tab of your newly created app
- Record the
Consumer Key
andConsumer Secret
for later use - Scroll down to "Your Access Token", and click the "Create my access tokens" button
- Record the
Access Token
andAccess Token Secret
for later use
Slack
- Head to Slack Integrations
- Create a new incoming webhook
- Record the webhook URL for later use
Deployment
Now that you have all of the required secrets, you're ready to deploy!
The application requires the following environment variables:
| Environment Variable | Description |
|------------------------|---------------|
| SLACK_CHANNEL_NAME
| the name of the Slack channel to send incoming tweets to |
| TWITTER_SEARCH_STRING
| the keyword to look for on the Twitter firehose |
| CONSUMER_KEY
| the key for your Twitter application |
| CONSUMER_SECRET
| the secret for your Twitter application |
| ACCESS_TOKEN
| the token for authorizing your app to use your twitter account |
| ACCESS_SECRET
| the accompanying secret for your twitter account's use of the app |
To launch, simply execute npm start
, or deploy to Heroku where it just works automagically (via Procfile
)!
Heroku note: Don't forget to run heroku ps:scale web=0 worker=1
to get Heroku to run the worker dyno.