Using data to build better triggered email campaigns

With more data-driven email solutions than ever before, you can take your data and create a triggered marketing campaign sequence. Here's how...

Most people prefer to section off transactional and marketing emails from each other, and it’s easy to understand why. When it comes to things like your domain and IP reputation, it’s important to keep your transactional messages separate from your marketing messages. 

However, in the growing world of email automation, the lines are starting to blur and data from transactional emails gets lost in translation to marketing. Transactional data should coalesce seamlessly into targeting your marketing audience.

Data has brought us a long way

Data collection has become an abundance with the multiplex of media channels potential prospects or customers connect with to interface with a business. Our personal favorite channel (no surprise) is email. Maybe more surprisingly, email tracking for transactional and marketing emails is one of the blind spots that companies still haven’t incorporated. It’s one of the many solutions customers come to Mailgun to solve.

But let’s take a step back. Way back in the day (read: a couple of years ago) bulk marketing emails were still cutting it as far as conversions for most businesses. 

Times change

Today, you can’t send email like you did back in the early 2000s with email bursts left and right. Bulk marketing emails with zero personalization have fewer open rates, clicks, and higher complaints. They’re boring, and nobody is going to click on a boring, blanket marketing push. If you can’t change with the times, you’ll get left behind in the spam folder.

Email automation has come a long way. Nowadays, you can use companies like to pull different data metrics to create highly personalized triggered email campaigns. 

With more data-driven email solutions than ever before, you can take your data and create a triggered marketing campaign sequence. These sequences create highly personalized content for the recipient, making it more meaningful for them. Better content leads to more engagements, and triggered marketing campaigns are a great way to do that. 

How do you do that? 

To start, it requires a defined plan that is set in motion by behavior and contextual data collected from your customer channels. Email marketing automation services such as and Iterable are powerful platforms and enabling designing decision-based or sequenced emails through a CRM. 

The easiest way to explain a triggered email campaign, to us at least, is with an example. Let’s take an e-commerce platform (travel booking agency) and the amount of customer email touchpoints and opportunities to have insight into a particular recipient:

  • Welcome Email

  • Password Reset Email

  • Receipt Email

  • Invoice Email

  • Shipping Notification Email

With these recipient triggered emails, Mailgun tracks the email each step of the process and provides detailed meta-data for events that occur. Insights from analytics and meta-data ensue a method for customers to structure client base segmentation. 

Bringing it together with Handlebars and Email Templates  

One of the benefits of being a more developer-focused platform is that our email templates feature gives you a lot of room to store and play. One way of doing this, especially in the case of making personalized triggered emails, is by supporting Handlebars v 3.0 and Go-lang as our template engines. With these template engines, we can create a more robust email marketing messages without too much legwork. 

Continuing with our travel booking agency example, let's imagine a scenario in which a potential prospect signed-up with an account but has not made a purchase. We recognized from behavioral data they interacted with two particular cities while browsing our websites. With this data, we can create an email that suggests these two cities as popular travel destinations.

Our initial step is to prepare a template to be sent to re-engage with the customer. The example API request will demonstrate storing a simple HTML example including Handlebars expressions with Mailgun’s Templating feature.


From there, the recipient will receive an email that has those two cities as places they could travel. Pretty cool, right? This is just a simple example, but you can build sophisticated newsletters, re-engagement campaigns, and even welcome emails that are tailored to your recipient.

Data + Handlebars + email templates = great emails

Personalization at first glance is a daunting task to many senders, but it doesn’t have to be that way. If you take your data and plug and play with Handlebars, your email templates will stand out against blanket email bursts. Better emails make for better engagement, and that keeps you out of the spam folder.

Should you ever run into trouble with our templates and handlebars, feel free to reach out.

Sign Up

It's easy to get started. And it's free.

See what you can accomplish with the world’s best email delivery platform.

Related readings

Different ways to build AMP emails

Have you seen the agenda of different upcoming conferences like the Chicago Digital...

Read more

Building HTML email and workflow tips

We hosted a Google Hangout yesterday featuring our Lead Digital Product Designer, Lee Munroe. In this hangout...

Read more

Responsive email templates you can get creative with

We’ve been rolling out a ton of new features these past few weeks, and the rollout keeps coming...

Read more

Popular posts

Mailgun iconSee what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending