Building a Slackbot is surprisingly easy and I wanted one that would send RSS feeds to a special room. This, I discovered, was a bit hard. This is why I wanted to share some of my work here.
The instructions for API key generation are here.
Once you have your token, simply place it in the code below where it says “YOUR API TOKEN.” You can then select a channel to notify.
channel=”#newsroom” simple_feed(“litrelease.txt”,”https://www.sec.gov/rss/litigation/litreleases.xml",channel,"SEC Litigation”)
I’ve made this system as simple as possible and all of the necessary data is stored in text files. This could be improved considerably but it works for now. I’ve also tried to manage for different types of RSS feeds but some of them are very messy and so I created a few small error-detection routines to keep things moving.
Again, this is a very rudimentary system that sends new news to the selected channel. Code is below and email us at email@example.com if you have any questions.