How to connect Meteor with Slack?

Sending messages via Web Hooks to Slack

Aman Gupta
Jul 6, 2017 · 3 min read

About Meteor & Slack

Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. On the other hand, Slack is a team communication tool. intended to replace email communication between teams. It’s very easy and efficient to develop applications using Meteor. In this article, I am going to explain how you can send messages from you Meteor App to a Slack Channel.

Use Cases

First of all, let’s talk about possible use cases of this combination. You can send messages from your app to a channel on various different occasions such as:

  1. New User Registration


  • You can start via creating a new incoming webhook integration in your Slack Team. You need to be a team owner for doing the same.
Snapshot 1: Choosing Slack Channel
  • Now, copy the webhook URL provided in the next step.
Snapshot 2: Webhook URL
  • Now, create a Meteor Method in your app, where you can send a message to the specified webhook URL.
Code Snippet 1: Meteor Method
  • You can call this method with a message which can be a simple JSON object in the following form:
let message = { 'text': 'I am Aman Gupta'}
  • However, you can send complex messages with the help of message formatting provided via Slack.'notifications.slack', message);

You can follow this simple boilerplate to start sending messages from your Meteor App to a Slack Channel. You can also send these messages using simple javascript modules instead of Meteor Methods. Also, you can generalize this method and extend it to other frameworks, languages also. I hope you will find this technique helpful.

If you liked this article, be sure to recommend it and help spread good ideas as far and wide as possible just like the broadness of Technology. Please also leave your responses below :-)

Aman Gupta is Co-founder & CEO of YourMarch. He is working with his team on this disruptive platform to bring governance and technology on the same plate. He is very passionate about the way technology can be used to disrupt old models of democracy where the contribution of citizens was limited.

In his free time, you can find him playing games, lots of games :-). You can follow him on Twitter, Facebook or connect with him on LinkedIn.

Startup Aman!

Thoughts around Startups, Technologies, & Life :-)

Aman Gupta

Written by

Proud Indian, Entrepreneur, Technophile, Designer, Engineer, Gamer, Coder

Startup Aman!

Thoughts around Startups, Technologies, & Life :-)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade