ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Mailchimp webhook

This article gives you knowledge of how webhooks send information from Mailchimp to Meiro Events. 


Mailchimp is a marketing automation platform that helps you share email and ad campaigns with clients, customers, and other interested parties. Connecting campaign data from Mailchimp allows you to send the right message at the right time to convert more customers, boost customer loyalty, monitor trends, and track your campaign performance over time. 

Requirements

  1. A paid Mailchimp Transactional account is needed;

  2. Your webhook callback URL should be set up to accept POST requests at a minimum;

  3. It is needed to generate an API key;

  4. You should authenticate that webhooks originated from Mailchimp’s servers by following the steps laid out in the “Authenticating webhook requests”.


Learn more: about how to set Mailchimp webhook

Feature

Every Mailchimp Transactional webhook uses the same general data format, regardless of the event type. The webhook request is a standard HTTP POST request with a single parameter: mandrill_events.


There are three types of webhooks that Mailchimp Transactional currently POSTs: 

  • Message events: send, deferral, hard-bounce, soft-bounce, delivered, open, click, spam, unsub, reject

  • Sync events: allowlist or denylist sync

  • Inbound messages


The mandrill_events parameter contains a JSON array of webhook events, up to a maximum of 1,000 events. Each element in the array is a single event, such as an open, click, or denylist sync event. 


Examples of events in Mailchimp include:

  • Email opened - triggers when a recipient opens an email in a specific campaign;

  • New Audience -  triggers when a new Audience is added to a Mailchimp account;

  • New Campaign - triggers when a new campaign is created;

  • Link Clicked -  triggers when a recipient clicks the pre-specified link in the campaign;

  • New Customer/Subscriber/Unsubscriber;

  • New Order - triggers when a new order is created.


Examples of actions to perform within events:

  • Create Campain;

  • Create Custom Event on existing subscriber;

  • Add a member to a Segment;

  • Create Tag;

  • Unsubscribe Email;

  • Add or Update Subscriber.

Example data

Endpoint: the Subscribes event.

As soon as Mailchimp receives a callback for changes in subscription status from the Meiro Events, they will post that data to the configured Webhook with the request body:

{
  "type": "subscribe",
  "fired_at": "2009-03-26 21:35:57",
  "data": {
    "id": "8a25ff1d98",
    "list_id": "a6b5da1054",
    "email": "api@mailchimp.com",
    "email_type": "html",
    "ip_opt": "10.20.10.30",
    "ip_signup": "10.20.10.30"
    "merges": {
      "EMAIL": "api@mailchimp.com",
      "FNAME": "Mailchimp",
      "LNAME": "API",
      "INTERESTS": "Group1,Group2"
    }
  }
}

Use cases

Here are practical use cases on how to generate Mailchimp webhooks with the Meiro Events: 

  • You can guide every new user added to CDP with a series of welcome emails from Meiro. 

  • Upcoming birthday of a customer may trigger a birthday campaign to offer a gift as a present.

  • An automated message may remind users that they have left the basket abandoned and lead them to the checkout process.

  • You may set an autoresponder every time when any contact opens the campaign or clicks on a pre-specified link.

  • You may set an automated email to customers to notify them of the status of their order.