LinkedIn Today SMS Notification System using LinkedIn, Twilio, Django and Heroku
At LinkedIn we enjoy a monthly Hackday, and I usually use the opportunity to figure out new ways to combine our platform with other systems – I love combining different APIs to create new functionality.
This month I decided to use my hackday time to create an SMS notification system for our LinkedIn today system. Since I’m not always on the website, I frequently miss the viral articles being discussed until they’ve passed into my history, and I’d like to be able to jump in on the conversation while it’s hot. Using the LinkedIn Today API (currently only available internally), the system periodically checks each members feed ‘s see if there are any articles which are currently generating a huge amount of activity . Once these “hot” articles are found, they are sent via SMS (using Twilio) to the user’s cell phone and recorded in the DB. The member can reply to the SMS with “save” to add the article to their saved articles at LinkedIn, “share” the article with their LinkedIn network, change the notification level or cancel notifications entirely.
In order to build this system, I realized that I had to get several different systems to work together, and working through this process I realized that I had to solve several common problems. This series of posts will be a tutorial on how to do the following:
- Integrate Log in with LinkedIn into Django and deploy to Heroku
- Use the Heroku scheduler and python to send SMS messages using Twilio
- Handle SMS responses from Twilio in Django (on Heroku)