Creating a Real-Time Email Event Feed

There was a bit of a break in my 15 Days of Code Challenge over the holidays, but I’m back to finish the last three. Today, I’ve created a real-time email event feed by using SendGrid’s own Event Webhook, Firebase, and a couple other tools. Check out the tutorial below.

I use a Mac and wanted to showcase an easy way to get the real-time feed of what’s happening with my email. I thought it would be interesting to create a native Mac application that sits in the OSX menu bar right next to the clock.

What I want:

As soon as I click on the Icon, it drops a real-time feed of updating events happening on my emails.

How can I do that?

By getting the following pieces together, I can create the feed I want:

  • SendGrid Event Webhook
  • Firebase
  • Google Compute Engine
  • OSX menu tray application

SendGrid Event Webhook

The SendGrid Event Webhook sends your application data when any of the below events are generated:

 

Firebase

Firebase is a platform that lets you build real-time mobile and web apps. Whenever you update its storage it syncs those changes across all devices.

Google Compute Engine

Create a quick application in the google cloud that gets the event webhook data from SendGrid and pushes it into Firebase:

Finished Product: OSX App

Once our data gets pushed into Firebase, we need to sync across other applications to get a real time feed. So I created an OSX status bar application, whose menu items are automatically generated from real time events that get pushed into firebase.

I created a video below to showcase how this works:

I’ll be posting my last couple Code Challenge posts over the next few days, so check back to see what I’m working on!



SendGrid Team
Expert advice and insight about all things email including best practices tips, examples, and advice for marketers, developers, and everyone in between.