A JavaScript app that reads a set of feeds and posts the new items to a Slack channel. Runs in Node.js.
-
Be sure Node is installed.
-
Download the folder.
-
At the command line, in the folder: npm install.
-
Edit config.json to set it up (see below).
-
At the command line: node rsstoslack.js.
The only tricky part of the setup is to get a magic URL from Slack that enables rssToSlack to send messages to your channel.
If you click on this link, it will redirect to your Incoming Web Hooks page.
-
Choose a channel from the popup menu.
-
Click the big green button, which takes you to a page with a long URL on it.
-
Copy the URL to the clipboard.
The feeds array can have as many elements as you want. rssToSlack will read each feed once a minute, and post a new item to the slack channel you specify.
-
Give your feed a unique name (that is don't give two feeds the same name).
-
Set enabled to true (this is present so you can disable a feed without removing it from the array).
-
Provide the URL of the RSS feed.
-
Provide information about the Slack channel. Most important provide the URL of the web hook (see above). You can also specify a name for the hook, an icon, or an emoji character.
You can review the structured version of the code, it might make a little more sense this way. ;-)
Please post a note on the Server Snacks mail list.