Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Use Drupal and MailChimp Together

Video loading...

  • 0:02
    Using MailChimp with Drupal 7
  • 0:04
    Use Drupal and MailChimp Together Series Sponsored by MailChimp
  • 0:10
    Drupal is already capable of sending email by itself.
  • 0:13
    And there are plenty of contributed modules that allow you to maintain a mailing list within Drupal.
  • 0:18
    But there are some distinct advantages
  • 0:21
    to using a service like MailChimp to maintain your mailing lists,
  • 0:24
    and send your email campaigns.
  • 0:27
    In this tutorial, we'll talk about what MailChimp is,
  • 0:31
    look at the benefits of using MailChimp with Drupal,
  • 0:33
    and we'll cover some of the terminology that you'll want to be familiar with,
  • 0:37
    and take a really high-level look at how the MailChimp module
  • 0:41
    goes about accomplishing its integration.
  • 0:43
    By the end of this tutorial, you should be able to explain to someone
  • 0:47
    why they might want to use MailChimp with Drupal,
  • 0:50
    and to be able to list the various types of integration
  • 0:53
    provided by the MailChimp module.
  • 0:56
    So what is MailChimp?
  • 0:58
    MailChimp is a web-based email marketing tool
  • 1:02
    build in a pretty standard software-as-a-service model.
  • 1:05
    Chances are you've seen MailChimp-powered emails before,
  • 1:08
    even if you didn't know that that's where they came from.
  • 1:11
    A lot of people use MailChimp to send email newsletters,
  • 1:15
    invitations, anything that really involves sending a single email
  • 1:20
    to a list of people that are interested in getting that email.
  • 1:24
    At its heart, MailChimp helps you create and manage lists of contacts,
  • 1:29
    not unlike an address book.
  • 1:32
    Complete with email address and any other relevant information you'd like to collect.
  • 1:36
    You can then use MailChimp to send email newsletters, invitations, reminders,
  • 1:41
    and all kinds of other information to everyone on that list.
  • 1:45
    Or even to just a subset of the people on the list, based on certain criteria
  • 1:49
    and information that you've collected about them.
  • 1:51
    You could probably do that with Drupal as well,
  • 1:54
    but there's a lot of reasons, some of which we'll cover in this presentation,
  • 1:58
    that you might want to consider MailChimp instead.
  • 2:00
    So, I mentioned MailChimp uses a software-as-a-service model.
  • 2:03
    So depending on the size of your list,
  • 2:06
    the volume of email that you're sending,
  • 2:08
    you might end up paying for it over time.
  • 2:10
    But it's free to start, and for up to 2,000 subscribers,
  • 2:14
    which for most people, is going to be plenty.
  • 2:16
    And if not, it at least gives you the opportunity to test it out
  • 2:20
    and figure out if the tool is a good fit for you and your team.
  • 2:24
    I see some of the biggest benefits to using MailChimp
  • 2:28
    as being the things that are related to the people who are creating the email
  • 2:32
    and the content that is getting sent out to your list.
  • 2:35
    So, MailChimp provides some really great tools
  • 2:38
    for drafting emails directly in your browser
  • 2:41
    and saving those drafts so that you can share them with your peers
  • 2:44
    or your teammates, and have them review before they're sent,
  • 2:48
    or you can continue to work on them over time.
  • 2:51
    MailChimp also provides some amazing tools for designing HTML templates
  • 2:56
    directly within your browser.
  • 2:58
    They've got a really great drag- and-drop user interface for doing that.
  • 3:01
    They also have the ability for you to code your own templates.
  • 3:04
    A big benefit of using a tool like MailChimp
  • 3:07
    is that they have already spent a lot of time figuring out
  • 3:11
    how to best handle HTML email.
  • 3:14
    And so they're compatible with a really wide range of devices
  • 3:17
    and various different email clients,
  • 3:20
    helping to ensure that, as best as possible,
  • 3:23
    the email that you send to your list looks the same for everyone.
  • 3:27
    Speaking of how it looks,
  • 3:29
    MailChimp provides content creators with some really powerful tools
  • 3:32
    for previewing emails before you send them.
  • 3:35
    You can do it in your browser, as shown here,
  • 3:38
    or you can send yourself or anyone on your team
  • 3:41
    a copy of the email as a preview without having to send it to the entire list.
  • 3:46
    It's pretty nice.
  • 3:48
    MailChimp also provides detailed metrics for every campaign that you send,
  • 3:52
    and for every list that you manage.
  • 3:54
    As a content creator, sending an email is only part of the job.
  • 3:58
    You also need to be able to measure the success of the campaigns that you're sending,
  • 4:02
    and make adjustments to them over time.
  • 4:06
    MailChimp provides a whole bunch of different metrics and data visualizations
  • 4:09
    you can use to figure out who's opening their email,
  • 4:12
    who's clicking on links, which links they're clicking on,
  • 4:14
    and all kinds of other things.
  • 4:16
    It's kind of like Google Analytics for your emails.
  • 4:19
    Personally, I see this as one of the biggest selling points of MailChimp with Drupal.
  • 4:23
    These are the types of features that while you could totally build yourself,
  • 4:25
    in the world of deadlines and budgets,
  • 4:28
    let's be honest. You're probably not going to ever build them.
  • 4:32
    But that's OK, because MailChimp has a whole team of people
  • 4:35
    working on them for you.
  • 4:37
    So, lots of great reasons that content creators might be interested in using MailChimp.
  • 4:42
    There's also a lot of features that aren't specific to content creation
  • 4:45
    but are super-useful nonetheless,
  • 4:48
    things like; MailChimp is an approved bulk mailer
  • 4:51
    so you can send lots of emails to lots of people
  • 4:54
    with a much lower risk of being flagged for spam.
  • 4:57
    Services like MailChimp have the ability to work with ISPs and corporate domains
  • 5:01
    to ensure your emails are recognized as safe and approved,
  • 5:04
    and they can handle things like retries, if your email bounces.
  • 5:08
    All of this adds up to more likely delivery of the email that you send.
  • 5:14
    MailChimp has some tools that are capable of abuse monitoring.
  • 5:18
    It uses a system of monitors that any time you send an email out to your list,
  • 5:24
    it scans the content of the email to make sure that you and your team
  • 5:27
    aren't doing anything that could be flagged as spammy
  • 5:30
    or maybe even illegal.
  • 5:33
    Finally, in my experience, MailChimp can help prevent embarrassing mistakes.
  • 5:37
    You can maintain a mailing list even in just a text file.
  • 5:41
    And you could send an email to everyone on that list
  • 5:43
    right through your Gmail account.
  • 5:45
    But it's really easy to mix things up— like, what happens if you put everybody's address
  • 5:49
    in the cc field instead of the bcc field, for example?
  • 5:52
    So I like that MailChimp allows me to prevent
  • 5:55
    some of these embarrassing mistakes from ever happening.
  • 5:57
    It turns out they're just really good at working with large lists of email addresses
  • 6:02
    and they make that a little bit safer.
  • 6:04
    Once you've decided that MailChimp is the tool for you,
  • 6:07
    or something you might want to try out,
  • 6:09
    if you've got a Drupal site, you might want to look at the MailChimp integration with Drupal.
  • 6:13
    The Drupal module that integrates MailChimp with Drupal
  • 6:16
    is at
  • 6:19
    This module is maintained by ThinkShout,
  • 6:21
    with assistance from MailChimp's program to help provide integrations
  • 6:24
    with popular web applications.
  • 6:26
    So, it's really well taken care of and continues to improve over time.
  • 6:30
    The module itself consists of the main MailChimp module,
  • 6:34
    which provides integration with a MailChimp API
  • 6:37
    and some basic configuration, like storing API keys in a handful of submodules,
  • 6:41
    and then, those submodules.
  • 6:43
    The MailChimp Signup module allows you to create anonymous sign up forms
  • 6:46
    for your MailChimp lists, and display them as blocks
  • 6:49
    or stand-alone pages within Drupal.
  • 6:52
    The MailChimp Lists module allows you to subscribe any entity
  • 6:56
    with an email address to MailChimp lists,
  • 7:00
    by creating a MailChimp list field
  • 7:03
    and allowing anyone who can edit that type of entity
  • 7:06
    to subscribe, unsubscribe, and update member information
  • 7:10
    directly from within Drupal.
  • 7:12
    The MailChimp Campaigns module allows you to create and send email campaigns
  • 7:17
    directly from Drupal
  • 7:19
    or to start a draft email campaign in Drupal
  • 7:22
    and then finish it up using the MailChimp UI, and send it from there.
  • 7:27
    And finally, the MailChimp Activity module
  • 7:30
    can be used to display a tab on any entity with an email address,
  • 7:34
    showing the subscribe, unsubscribe, and history
  • 7:37
    of that email address with relationship to your email list,
  • 7:41
    effectively exposing some of the detailed metrics that MailChimp tracks for you, directly within Drupal.
  • 7:47
    So here's an example.
  • 7:49
    You might do something like enable the MailChimp Lists module
  • 7:52
    which gives you a subscription field that you can attach to any entity within Drupal.
  • 7:56
    And then you could attach that MailChimp list field
  • 7:59
    to the user entity type.
  • 8:01
    Once you've done that, whenever someone creates a new user entity
  • 8:05
    or effectively registers for a new account on your site,
  • 8:08
    they'll have the option to subscribe to one or more lists,
  • 8:11
    whatever you've got configured in MailChimp.
  • 8:14
    In addition to that, anytime they edit their account,
  • 8:17
    they'll also have the opportunity then to change their subscription settings.
  • 8:21
    So they might unsubscribe from one list, and subscribe to another,
  • 8:24
    or they might change some of their settings for subscriptions to lists.
  • 8:28
    All that can be handled from right within the Drupal user interface.
  • 8:31
    But because this is using the fields and entities system,
  • 8:34
    you can also subscribe other entity types.
  • 8:37
    Another example might be you've got the organic groups module installed,
  • 8:41
    and you're using it to manage all of the teams for a Little League baseball league,
  • 8:46
    and for each team, you've got a group.
  • 8:49
    And each of those groups has an email address associated with it
  • 8:53
    that is the primary contact for that team.
  • 8:55
    You could then subscribe all of those groups
  • 8:59
    to a list in MailChimp
  • 9:01
    that is your contacts for Little League baseball team managers.
  • 9:05
    Now you can send an email to everyone that's in contact
  • 9:08
    for one of those teams. Lots of options.
  • 9:11
    Another really cool thing that the MailChimp module does
  • 9:14
    is it helps synchronize the data
  • 9:17
    in Drupal fields with the data in MailChimp merge fields.
  • 9:21
    If you're familiar with fields in Drupal,
  • 9:23
    it's this idea of being able to add new fields to any entity type,
  • 9:27
    so, for example, we might add a name field and a location field
  • 9:31
    to the user entity type in Drupal.
  • 9:33
    And the MailChimp version of that would be what are called merge fields.
  • 9:36
    You can do the same thing for any contact in MailChimp.
  • 9:40
    You can configure new fields like first name, location, et cetera.
  • 9:44
    Using the Drupal and MailChimp integration,
  • 9:48
    we can keep the values of those fields synchronized
  • 9:50
    between what someone enters in Drupal
  • 9:53
    and what appears in your mailing list.
  • 9:55
    So, if you ask users of your site to tell you which city they live in,
  • 9:59
    you can then segment your mailing list based on that,
  • 10:02
    and send an email campaign to just people that live in a specific city.
  • 10:06
    In addition to the fields and entity system where you can subscribe any entity,
  • 10:10
    and the ability to merge values from a Drupal field
  • 10:14
    into a MailChimp field,
  • 10:17
    the MailChimp module also provides integration
  • 10:19
    with a handful of other popular contributed modules
  • 10:22
    like the Views Bulk Operations module, and the Rules module.
  • 10:25
    Both are really powerful integrations, there.
  • 10:28
    And it also provides support for listening to MailChimp's Webhooks.
  • 10:32
    So, we can configure things such that anytime interaction happens with a MailChimp list,
  • 10:38
    MailChimp is capable of pinging our site
  • 10:40
    and saying, "Something happened. Would you like to make changes?"
  • 10:44
    If, for example, I click on the Unsubscribe link at the bottom of an email campaign
  • 10:50
    and unsubscribe myself from the list,
  • 10:52
    MailChimp can ping Drupal
  • 10:54
    and Drupal will be aware of the fact that my user account just unsubscribed
  • 10:57
    so it can update the information in Drupal.
  • 11:00
    Next time I log in to Drupal and I go to edit my profile,
  • 11:03
    it'll reflect that I've unsubscribed from a mailing list automatically.
  • 11:07
    Part of keeping the data between Drupal and MailChimp in sync
  • 11:11
    is supporting these Webhooks.
  • 11:14
    So, there's a lot of reasons that you might want to choose to use MailChimp
  • 11:18
    to send your emails. It's a really popular service to start out,
  • 11:21
    and it's got a ton of useful features both for content creators,
  • 11:24
    like the ability to create drafts and send previews,
  • 11:27
    and design HTML templates right from within the browser,
  • 11:30
    as well as tools that help to ensure consistency
  • 11:34
    and deliverability of your emails
  • 11:37
    to everyone on your list.
  • 11:39
    And then there's the Drupal MailChimp module,
  • 11:41
    which provides integration between Drupal and MailChimp.
  • 11:45
    In a lot of ways, what it's doing is it's helping to make it so that users
  • 11:48
    can manage their subscription to your list,
  • 11:51
    without ever having to leave your Drupal site.
  • 11:54
    And so the editors, or content creators on your Drupal site
  • 11:57
    can do things like create new campaigns
  • 12:00
    right from within Drupal itself.
  • 12:03
    The combination of these two things allows you to create lists
  • 12:07
    of people that you would like to send emails to for various different reasons,
  • 12:10
    and it gives you a lot of control over the information that's collected
  • 12:14
    for those lists
  • 12:16
    and what the email that you're sending looks like
  • 12:18
    and how it's going to be sent.
  • 12:21
    So, combine the two together to create a really great system
  • 12:24
    for email marketing within Drupal.

Use Drupal and MailChimp Together


Drupal can already send email, and there are plenty of contributed modules that allow you to maintain a mailing list within Drupal. But there are some distinct advantages to using a service like MailChimp to maintain your mailing list and send your emails. In this tutorial we’ll talk about what MailChimp is, look at the benefits of using MailChimp with Drupal, cover some terminology that you'll want to be familiar with, and take a really high level look at how the MailChimp module goes about accomplishing its integration.

What is MailChimp? MailChimp is a web based service for designing and sending email marketing campaigns, and maintaining one or more lists of subscribers.

Why should you choose MailChimp? There are a lot of reasons to choose MailChimp as the tool to use for managing your email marketing efforts. At a really high-level it boils down to the fact that a service like MailChimp, which has an entire team dedicated to improving it's application, can potentially create tools and manage infrastructure that would be hard for you to develop on your own. In addition, MailChimp has a strong track record, and great integration with Drupal via the MailChimp Drupal module.

The MailChimp Drupal module allows you to tightly integrate your Drupal site with the MailChimp service by leveraging the MailChimp API. You can allow users to subscribe to your mailing lists, and manage their subscriptions, from within Drupal. Values collected for a field attached to a Drupal entity can be synchronized with merge fields for contacts in a MailChimp list. Administrators can send email campaigns right from within the Drupal UI, and monitor their performance. And much more.

By the end of this tutorial, you should be able to explain to someone why they might want to use MailChimp with Drupal. You should also be able to list the various types of integration provided by the MailChimp module.

Take your learning further

  • In one paragraph answer the question: What is MailChimp?
  • List the modules contained within the MailChimp project on
  • Describe two ways that MailChimp helps prevent you from being flagged as a Spammer.
  • How does MailChimp aid content creators who are trying to create and send email campaigns?
  • Further exploration: Can you generate a pros/cons list to use when deciding wether or not you should use MailChimp for your project?

Series Sponsored by MailChimp

Log in or sign up to download companion files.
Additional resources: