Skip to content

Mailchimp integration

Tom Barrett edited this page May 14, 2020 · 9 revisions

This is a quick intro of how to integrate Jethro with Mailchimp.

How it works

Jethro can synchronize a mailchimp list with a Jethro saved report (see Persons > Reports). This script will add persons from Jethro to the mailchimp list. Anyone in the mailchimp list who is not (any more) part of the Jethro report will be deleted from it. If people receive an email and click "unsubscribe", mailchimp will mark them as unsubscribed and not send them any more emails. They'll stay on the list.
Unsubscribes are not sent back to Jethro.

What you need

  1. A Jethro system
  2. A saved report in your jethro system which lists the people you want synced to mailchimp
  3. A mailchimp account (they're free)

Server-level Setup (by a server admin)

If you're an Easy Jethro customer, this has already been done for you. Find the full path for your Jethro mailchimp_sync.php file Add a cron entry to run it nightly 0 1 * * * php /path/to/jethro/scripts/mailchimp_sync.php

Jethro-level Setup (by a Jethro operator)

In Mailchimp:

  1. Generate an API key in mailchimp https://us12.admin.mailchimp.com/account/api/ eg 0dc19c9bb57d21294e5b23713588d641-us12
  2. Create a new audience (aka list) https://us12.admin.mailchimp.com/lists/ (You can use an existing audience, but beware that any subscribers not found in the Jethro report will be deleted)
  3. Add four new fields to the list, each of type text (Edit audience > Settings > Audience fields and merge tags)
  4. Set each field's "Label" AND "tag" to the following:
    • CONG
    • AGEBRACKET
    • GENDER
    • STATUS
  5. UN-TICK the "visible" checkbox for each of these vars. It should then look like this:
  6. Get the mailchimp audience ID (Edit list > Settings > audience name and defaults) eg 060741da80

In Jethro:

  1. Go to Admin > System Configuration and set the Mailchimp API key setting with the value you generated in Mailchimp above.
  2. Go to Persons > Reports and create or edit a report with the criteria for people who should be on the mailchimp list.
  3. When saving the report parameters, right down the bottom there is a "Mailchimp List ID" field. Paste in here the List ID you got from mailchimp.
  4. Wait (overnight) for the sync script to run (or if you have access, run it manually)
  5. Once the sync has run, you can go to the Persons > Reports page and click the "send campaign" link next to the relevant report. This way you can compose a basic email in Jethro and have it sent out via Mailchimp. Alternatively you can log in to Mailchimp and compose are more complex mailout.

Warning

Once Jethro has synced to your Mailchimp list, DO NOT make any manual changes to the list other than to mark addresses as subscribed/unsubscribed. Any subscribers you add directly to the list will be REMOVED by Jethro. If you delete a contact from your Jethro list, it will lead to problems - Jethro will try to re-add the address but Mailchimp won't allow it. Make changes in Jethro and let Jethro manage the Mailchimp list.

See the pages list above

Clone this wiki locally