WordPress integration to Slack deployed on Heroku

Deploying WordPress integration to Slack toy application on Heroku

A few weeks ago, I posted a note about a tinkering project with the purpose of building a small web API with Flask to get notifications on Slack from my WordPress blog.

At the time, the application was deployed on a Raspberry Pi and I wanted to try and get the application to run on Heroku.

In the process, I adopted some of Heroku best practices on the management of the environment setup. I cleaned the code so that it can be shared on GitHub and I played around with Slack message formatting capabilities.

What did I learn?

At some point during the migration of the application from the Raspberry Pi, I spent a lot of time being stuck with an “unauthorized access” error. I assumed that the issue was coming from my poor understanding of the port routing logic of Heroku. I was wrong, as the issue was linked to the definition of the Slack API Key.

In the process, I learned that the official documentation is often the best place to find reliable information on a service, as the Heroku documentation show me the correct path to the solution.

I also learned that you need to get as much insights as possible from logs and error messages before starting to mess with your code.

Resources

I used two tutorials from Heroku documentation:
1. Getting Started on Heroku with Python
2. Deploying Python and Django Apps on Heroku

I also used Slack documentation for message formatting.

Shared repo

The code of this project has been shared on Github

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s