APIs

Integrating Slack with Heroku via API

I wanted to share my experience with how to integrate an app that sends what’s trending in GitHub to Slack via an API. It was great experience and much credit goes to Matt who shared a great implementation plan that gets one up and running in under an hour.

A few errors that I made that hopefully by highlighting here will prevent others from stubbling in the same manner and make the deployment smoother.

  1. Be conscious about typos - I made the error with this code $ heroku config:set STARBOT_COMMAND_TOKEN and instead typed STARTBOT_COMMAND_TOKEN with the extra T.

  2. Naming the apps in Heroku is optional - if you intend not to name it, make sure you skip the text within the brackets. Type $ heroku create instead of $ heroku create {optional-app-name}.

  3. Heroku automatically assigns a name to your app if you did not give it one - Make note of this name, and when it comes time to configure Slack, make sure to use the assigned app name instead of starbot-example here : URL http://starbot-example.herokuapp.com/commands/starbot

By sharing these tips, hopefully it will save one time in troublshooting and focus instead on the glory of seeing your creation come alive before your eyes. Happy coding!

Written on March 23, 2016