Twickr is a small tool we’re using @netlify to get tweets of interest delivered to our Slack.
For us Slack has turned into a sort of command center, where we process support requests, discuss features, share drafts of mails or blog posts, get operational status messages and alerts.
Like most other startups we have a few stored twitter searches we tend to run all the time, to keep up with all that’s going on in our field. Terms like “Netlify” and ”static generators”, etc..
So we thought it would be nice if we could just get new notifications in Slack whenever someone tweets with such terms.
So last Saturday morning I whipped up a small tool in Go that takes care of this for us.
Today we’re releasing Twickr as open-source in the hope that this will be useful to others as well.
Twickr lets you setup a list of keywords you’re interested in and then connects to Twitter’s streaming API. Whenever someone mention any of your keywords in a tweet, it’ll send a message to your Slack channel of choice.
Download the relevant release for your server’s OS and architecture and extract the files.
- Go to Twitter’s Application Management and create a new app.
- Fill out the name description and website and create the app.
- Go to “Keys and Access Tokens” and create a new access token
- Create a new Inbound Webhook for your Slack account here
The Configuration File
config.json file in the same folder as the twickr executable. An example configuration file is included in the download.
- Fill in the credentials for your new Twitter app and the URL from your Slack webhook.
- Optionally specify which channel to send Twickr messages to
- Enter a coma-separated list of keywords you want Twickr to keep an eye on
cd <path-to-your-twickr-install> ./twickr
Normally you’ll run Twickr on a server (rather than on your laptop or desktop machine) where it can keep running continuously. An easy way to make sure it stays up after you close your SSH connection is to run it in a TMUX or Screen session.
We hope this tool can be useful to others :) Pull requests with extra features are welcome, though the aim is to keep it simple and just do one thing well.