Node.js library for posting App Store and Google Play app reviews to Slack.
var reviews = require('reviews-to-slack')
reviews.start({
slackHook: 'https://hooks.slack.com/services/T00000000/B00000000/token',
appId: '123456789'
})
npm install reviews-to-slack
Only provide mandatory fields to send reviews for an app to the default channel for the webhook.
var reviews = require('reviews-to-slack')
reviews.start({
slackHook: 'https://hooks.slack.com/services/T00000000/B00000000/token',
appId: '123456789'
})
Example that sends reviews for different apps to different channels. Can be extended with any combination of the options (see below).
var reviews = require('reviews-to-slack')
var apps = [
{
appId: '123456789',
channel: '#channel'
},
{
appId: 'com.my.app',
channel: '@user'
}
]
for (var i = 0; i < apps.length; i++) {
var app = apps[i]
reviews.start({
slackHook: 'https://hooks.slack.com/services/T00000000/B00000000/token',
appId: app.appId,
channel: app.channel
})
}
slackHook
: Mandatory, URL to an incoming Slack webhook.appId
: Mandatory, ID of an app in App Store or Google Play, e.g.123456789
orcom.my.app
.region
: Two-letter country code for App Store (e.g.us
), or two-letter language code for Google Play (e.g.en
).interval
: How often the feed should be queried, in seconds. Default:300
debug
: Set totrue
to log debug information and send welcome message to Slack. Default:false
channel
: Which channel to post to, set to override channel set in Slack.store
: To explicitly set the store,app-store
orgoogle-play
. In most cases desired store can be derived from the appId so setting this is usually not required.botUsername
: Set to override the default bot username set in Slack.botIcon
: Set to override the default bot icon set in Slack.appName
: Set to override the app name fetched from the reviews provider.appIcon
: Set to override the app icon fetched from the reviews provider.appLink
: Set to override the app link fetched from the reviews provider.
Apple is caching their reviews feed quite heavily; you can check if there's actually a new review available by going to https://itunes.apple.com/{region}/rss/customerreviews/id={appId}/sortBy=mostRecent/xml
. It may take several hours between updates to the feed. If you see a new review in the feed and it's not delivered to Slack in a timely manner, please file an issue.