Slack-bot, Integrating Slack with Meteor-Telescope app — Entertainment in Slack!

So, now that I have my app setup — — I thought why not automate stuff. Especially, i spend a lot of time in slack.

Here is the link to my team. If you need help setting up your team login button, check out this article.

So, why not have entertainment mixed with work all in one place. So, I pulled up my socks and started working on connecting slack to my Telescope based Meteor app.

The integration turned out to be rather easy! I will just show you how to write the meteor method. So, you can integrate it with any of the Meteor apps, including Telescope — I do it on post approval.

Step 1: Create the slack channel you need to add the feeds to.

Step 2: Create an incoming-webhook

Go to the below url and you will be able to create a new app in slack.


For me it was

This is what you

The next thing to do is, select Incoming Webhooks and then the channel you need to send the updates to. You can programmatically, decide which channel the updates should go to (more on this later).

Select Channel

This should give you a webhook url — Make a note of it. Something like.

Add this url to your settings.json file. It should look something like

"public": {
"title": "Coolmoviebites | Your Daily bite of entertainment ",
"webhookUrl": ""

Step 3: Get the slack-bot package

Go to Npm — Get this package —

There are many, but this is the one that I used.

npm install slack-bot (save)

var slackBot = require('slack-bot')(Meteor.settings.slack.webhookUrl);
function postToSlack(message, channel){
// console.log(message);
Meteor._sleepForMs(4000); //I put a delay, just so that the React Head Tags get loaded, OpenGraph, Twitter, meta, etc.
channel: channel,
username: 'new-updates',
text: message,
unfurl_links: true,
}, function (err, res) {
if (err) { throw err; }
// console.log(res);
Meteor.startup(function () {
postToSlack: function(message, channel){
postToSlack(message, channel);

And Boom! your code is all set. Just make the method call at the triggering point of this action.

In my case, it was on post Approval. So, whenever I approve a post, I send this to slack!

Step 4: Dynamic Channels

Do you see, that we added a channel parameter to our method? I have it configured based on language and category. So, people can subscribe to any of the channels.

    let channel = "#latest-updates";
for (var i =0; i < post.categories.length; i++) {
let category = Categories.findOne(post.categories[i]);
if(category.slug === 'devotional'){
channel = "#devotional";
if(category.slug === 'music'){
channel = "#music";

That’s it, happy slacking and getting entertained!

IF you like entertaiment and loved this piece. Please join my slack team - The first of it's kind for entertainment!
Ofcourse, if you are ready to help out in growing the community! Let's do it together!

Signing off!