mrfabbri / rssToSlack

A JavaScript app that reads a set of feeds and posts the new items to a Slack channel. Runs in Node.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rssToSlack

A JavaScript app that reads a set of feeds and posts the new items to a Slack channel. Runs in Node.js.

How to

  1. Be sure Node is installed.

  2. Download the folder.

  3. At the command line, in the folder: npm install.

  4. Edit config.json to set it up (see below).

  5. At the command line: node rsstoslack.js.

Getting your WebHook address

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.

  1. Choose a channel from the popup menu.

  2. Click the big green button, which takes you to a page with a long URL on it.

  3. Copy the URL to the clipboard.

config.json

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.

  1. Give your feed a unique name (that is don't give two feeds the same name).

  2. Set enabled to true (this is present so you can disable a feed without removing it from the array).

  3. Provide the URL of the RSS feed.

  4. 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.

Structured code

You can review the structured version of the code, it might make a little more sense this way. ;-)

Questions, comments?

Please post a note on the Server Snacks mail list.

About

A JavaScript app that reads a set of feeds and posts the new items to a Slack channel. Runs in Node.js.

License:MIT License


Languages

Language:JavaScript 100.0%