Automagic event emails

Using the Eventbrite API to automate email promotions

 

At Redfin, the Marketing team contacts customers all over the country about upcoming classes and events near them. We don’t send a lot of email to each recipient – nobody likes spam – but we do send a great deal of small campaigns each week, and they add up: this year, Redfin will put on almost 1,100 events, and year to date we’ve sent over 2.8 million emails promoting them. There’s so much going on that early this year, the team hired a third coordinator to further distribute the work involved in planning, scheduling, and promoting all these events. At the time, the process for building out an email for a class took somewhere under an hour, two or three different pieces of software, and a lot of manual HTML editing. We recently eliminated a couple of steps by integrating Eventbrite’s data API with a platform that generates the HTML emails, taking email prep time down to about 10 minutes and eliminating a lot of potential bugs and omissions.

Ugh. Have fun editing agent information.

The first step was figuring out how the event coordinators currently worked with email. It wasn’t pretty – they were cracking open HTML email templates I’d built previously, modifying the copy and event information, and sending them out. Our email sending platform prepends tags to links, making even simple tasks like editing anchors problematic. At one point, we managed to create an email that previewed fine in a browser, but after parsing by our system it rendered without the entire bottom half. While the vast majority of emails had no issues, what we were doing was complex and hardly ideal. This started a discussion: we already had a great deal of data in Eventbrite, didn’t have a short-term solution for building our own events platform, and really wanted to lock down the HTML to prevent avoidable errors.

It wound up being fairly simple to put together. We’d build a list of our markets, hit Eventbrite’s jQuery API, and pull down all the upcoming events from the selected area. Eventbrite gives you a ton of data, but most of what we wanted was in the event description – and would have been tough to parse and jam into an email. Instead, we scrape the event titles for keywords that let us figure out what type of event has been selected. Once that’s determined, the editable fields (and some uneditable ones, like location, date, and time) are prepopulated with some boilerplate information. At this point the events team can modify the content, toggle some features – do we want to promote an upcoming event? will there be food at the class? – and they’re ready to go.

Adding an instructor in the generator is as simple as searching for their name or email.

But what about solving the busywork of getting agent information? We have hundreds of agents in markets all over the country, and nobody wants to spend 5 or 10 minutes per email searching for their latest photo and verifying that their phone number and email are correct. At this point I got together with Ben & Robert on the Commerce team, who build & maintain our internal Agent Tools platform, and got some pointers. They’d just recently implemented type-ahead search, and it would perfectly solve the agent data problem for our emails. With a lot of help from them, and a little bit of tweaking, the generator was updated to pull down agent information and jam it directly into the template. Once we’re done, the email looks like this!

After smashing some bugs that the events team graciously helped find (it took several days of building emails with the beta generator to really nail things down), we had a pretty robust, semi-automated way to create emails quickly and consistently. The events team can now prep and send promotions much faster than before, and we’ve been able to really standardize our emails on a couple of minor variations. Even better, we’re looking into ways to improve and expand automatic HTML generation beyond emails and into other marketing promotions.

Discussion

  • Ricardo Carvalho

    Very good blog, great information.