Zapier Makes Mandrill Integration Easy

Whenever we write or talk about transactional email, there is usually an accompanying laundry list of things that are worthy of custom email notifications. You know, welcomes, comments, receipts and the like. But this always seems a bit glib: sure, those are great examples of what transactional email is, but it doesn't say much about the how.

Indeed, because "how" is a developer topic, it can be difficult to fit thorough prescriptions into otherwise-brief business topics. And besides, coding isn't for everyone! What good is all the business advice if someone can't get started integrating without a computer science degree (or at least a solid year hacking on the web)?

Today we're going to sidestep these problems and put Mandrill to work leveraging more integrations with less coding. Read on to find out how.

Zapier: Integrations Made Easy

Not long ago, a company named Zapier reached out to us to let us know they'd integrated with Mandrill. Eager to get a quick blog writeup out of it, we ran off to investigate their service, and...

Wow. This thing is powerful!

More than simply leveraging Mandrill directly, Zapier makes it easy to build your own integration for Mandrill. Connecting us to any of over 100 services is a breeze with no coding required, including BaseCamp, Github, Evernote, and yes, even MailChimp!

Now we'll revisit those transactional examples with Zapier in hand, this time a bit more concretely, leveraging real services.

You could send an email (to yourself or your users) when:

Let's dig in a little deeper and look at the PayPal example in detail.

An Example: PayPal Notifications

We'll start by looking at a PayPal receipt email:

These are the notification emails you get just after a purchase has been made with your PayPal account. It's a great example of transactional email: "Some of your money got sent to this company in exchange for these items, just thought you should know!" It's informative, it's useful, and it helps keep your money safe.

But it's not particularly pretty, from the seller's point of view (especially for brand-conscious vendors.) Where is their logo? Where is their personalized "thank you" message, or some promise that the goods are on their way? Heck, does the seller even know that we bought something?

Let's wire up another notification email via Zapier. This will allow us to:

  • write more personable copy that fits our brand
  • customize with the customer and purchase details
  • send it from an email address we control so that replies come straight to us

I can hear our customers' delight increasing already...

Setting Up The Integration

First we'll need to select our "trigger" and "action". The trigger is a "PayPal Successful Sale". The action, "Mandrill Send Mail". Now we need to configure the two integrations.

For PayPal, Zapier gives you a notification URL that you'll take over to your PayPal account and set up as an Instant Payment Notification (IPN).

For the Mandrill side, you'll just need your username and an API key (which you can find in your account settings). We suggest generating a new key specifically for this Zapier integration. This helps you isolate potential problems when building multiple integrations against the same Mandrill account.

Once those are set, you'll be presented with the real meat of the Zapier application:

From here it's trivial to fill out the form and set up the email template that will be sent to your customers. Put your email address and probably your company name in the "from" fields. (You could use your own name, but your customers probably know your brand, not your name. Unless you ARE your brand, of course!) You should also drop your own email into the BCC field for good measure. This gives you an automatic record of all these emails over time, and gives you a leg up should you need to troubleshoot any problems that may arise.

Setting up a plain text email for this is quick and easy. Just start typing out your message, and click and drag any information you need from PayPal into the text box where you're typing. Those fields will be dynamically injected for each email sent, which is the real magic here. This is where Zapier is saving you from writing code!

Here's the example template I just made up:

Hello from My Store!

You've just purchased {{payment_gross}} worth of stuff from us, including {{item_names}}.

We've received your order and are processing it now. We'll notify you with shipping information once we've gotten it packed up and out the door.

If you have any questions, comments, or cat pictures you want us to see, simply hit reply and let it fly!

Thanks for being so great!
John Doe

Again, the bits in the curly braces will be replaced with live data from the current PayPal buyer. A text-only email may seem cheap or simple at first, but believe us, adding some personal words from you really goes a long way. Customers love it when they feel like there are real people on the other end of a business, especially in our web-dominated world.

Aside: HTML Templates

HTML emails are a much more complex beast if you want to do anything but the simplest headings and paragraphs. You'll want to work on your template outside of Zapier's interface and paste it in later, something far beyond the scope of this article but an entirely worthy idea! Especially if you want to get your logo and other styling in there to really wow your customers.

(Aside to the Aside: If you're looking for a place to get started on email templates, check out MailChimp's repository of open source email templates on Github.)

Get Creative

While we love this PayPal use case, it's a pretty straightforward and common example. What we're really excited to see is what you will come up with. Every individual business, organization, and project is different. What integrations actually move the dial for you? What integrations just plain excite you?

Get creative! Set up integrations for the things YOU think are interesting.

With 12,000 free emails a month, Mandrill can handle a lot of activity without charging you a dime, so go experiment!