New disqus' comment notifier for Slack
Go to file
Norman Abramovitz 5485b25202 Merge branch 'master' of git://github.com/jonathanwiesel/slackus 2019-03-06 03:42:30 -08:00
lib Woops, fix wrong reference to config 2015-02-16 11:43:01 +01:00
.gitignore Only ignore NPM files 2014-12-18 21:10:59 +01:00
.jshintrc Add JSHint file (based on AirBnB’s style guide) 2014-12-18 21:10:27 +01:00
CODE_OF_CONDUCT.md Updating CODE_OF_CONDUCT.md 2019-01-15 15:32:40 -05:00
LICENSE Add my name to the license 2014-12-18 21:11:10 +01:00
Procfile fix for cf 2016-09-20 13:19:14 -04:00
README.md Add Heroku button 2015-02-17 10:30:18 -04:30
app.json 🐛 Fix invalid json for Heroku 2015-03-23 19:44:06 -04:30
config.js fix for cf 2016-09-20 13:19:14 -04:00
index.js Tidy up things a bit 2015-01-26 22:56:10 +01:00
package.json Bumping version 2015-02-17 11:05:25 -04:30

README.md

slackus


Deploy

This simple application monitors a Disqus forum (website) and sends a notification to a Slack channel when a new comment is made in said forum. Can be easily deployed to Heroku.

To configure the application, either edit config.js or set the following environment variables:

SLACKUS_DISQUS_API_KEY=[your api key]
SLACKUS_DISQUS_API_SECRET=[your api secret]
SLACKUS_DISQUS_ACCESS_TOKEN=[your access token]
SLACKUS_DISQUS_FORUM=[your forum's shortname]
SLACKUS_SLACK_WEBHOOK=[your incoming webhook's url]

It's possible to check for comments on multiple forums simultaneously. To do so, enter their shortnames as a comma seperated list, for example cats,stuff.

Your Disqus API key, secret and access token can be found by creating an application on https://disqus.com/api/applications/.

Your Disqus forum's shortname can be found on the settings page for your site (https://disqus.com/admin/, select your site under Settings).

Finally, you can set up an Incoming WebHook for Slack on https://my.slack.com/services/new/incoming-webhook.

Optional environment variables:

SLACKUS_INTERVAL=60       # Seconds between each check (60 by default)
SLACKUS_DISQUS_LIMIT=25   # Number of comments to check (25 by default, max 100)
SLACKUS_SLACK_MENTION=joe # Users to mention when notification arrives

The server will every X seconds (SLACKUS_INTERVAL) request the X most recent comments (SLACKUS_DISQUS_LIMIT) to check for new ones. If your forum may receive more than 25 new comments in a 60 second window, tweak those two variables to your liking.

Some more configuration options for Disqus and Slack are available in config.js.


Notes

This application was built using:


License

http://jonathanwiesel.mit-license.org/