Setting Up Your Meteor App to Post to Slack

by Ry Walker

It's really easy to get your Meteor app to talk to you via Slack. Once we get things setup, posting to slack will be as easy as logging to the console:

Slack.notify "*#{Meteor.user().email()}* just signed up"

And you'll see something like this in Slack...

So let's get started...


Step 1: Get webhook URL from Slack

We’re going to use Slack's web hook integration feature.

  1. Visit
  2. Choose a channel
  3. Get the URL


Step 2: A little Meteor work

We're using meteor-workers in this example to queue background work, so the API call doesn’t block the main node process on the server. FYI, you should have a background worker strategy for your Meteor app, and meteor-workers is a pretty easy way to get started.

Add Meteor  packages

  meteor add http
  meteor add differential:workers

Add code


  "slack": {
    "url": ""

class @Slack
  @notify: (text) ->
    if process.env.NODE_ENV is "production"
      Job.push new SlackJob text: text

class SlackJob extends Job
  handleJob: ()-> Meteor.settings.slack.url,
        channel: "#useractivity"
        username: "The App"
        text: @params.text
        icon_url: ""
        link_names: 1


It's that easy.

Share Share on Twitter Share on Facebook Share on LinkedIn

How Can We Help?

If you’re a middle-market or enterprise level organization with a problem that might be solved through technology, we’d love to set up a 15-minute Discovery Call to see how we might help.

Contact Us