In my final Code Challenge blog post, I’m taking a look at CrunchBase. If you’d like to read more about this Code Challenge, and see a list of other posts, visit my first post: 15 Days of Code Challenge.

In my previous blog posts we looked at a Python module and Machine Learning API that let us analyze incoming email by their sentiment and concepts based on the body of the email. In this post, I want to showcase another way to classify and prioritize your incoming email. We’ll look at the CrunchBase API and get information from their database on the sender and their company.

Requirements:

  1. Create a SendGrid account if you haven’t (http://www.sendgrid.com/free)
  2. Get access to the CrunchBase API (https://developer.crunchbase.com/)

Getting Started:

The first thing we do is create an incoming email address using the Parse Webhook. For more information on how to setup the Parse Webhook, you can check out this post. Next, we create a quick Python app that gets the incoming email, calls the CrunchBase API to extract more information from the senders domain, and lets us know the result. I’ve put the code below.

Using the Parse Webhook, I’ve created an email address return@analysis.bymail.in. Any email I forward to that address will be analyzed by the above python code. It then sends us back an email with the corresponding information.

Code

I’ll be putting together a wrap-up post about my favorite APIs and posts from the Code Challenge, so be sure to check back in soon. You can always hit me up on Twitter if you want to talk about these, too!



Meet Kunal, Developer Evangelist at-large for SendGrid and home-grown New Jersey hacker. He previously ran General Machines, which developed Deaftel - a phone service for the deaf that converts voice to text and text back into voice over a phone call. Since March 2013, Kunal has been working as a Developer Evangelist at SendGrid, helping enable developers to get the tools and resources they need to make awesome, creative stuff.