Home platformOS Logo

Integrating Mailchimp Using API Call Notifications

Last edit: May 21, 2020

This guide will help you create a Mailchimp integration for platformOS using API Call Notifications.

Requirements

To follow this tutorial, you should be familiar with creating API Call Notifications. You also have to have access to the Partner Portal and know how to manage integrations, and have a Mailchimp account where you can find your API key.

Steps

Integrating Mailchimp using API Call Notifications is a two-step process:

Step 1: Create API Call Notification

Create an API Call Notification:

  • Replace <<YOUR_API_KEY>> with your Mailchimp API key
  • Replace <<YOUR_DC_KEY>> with the last part of your Mailchimp API key (the part after the -, for example xxxxxxxxxxxxxxxxxxxxxxxxxx-us3 where us3 is the DC_KEY)
  • Replace <<YOUR_AUDIENCE_ID>> with your Mailchimp Audience ID. To find that follow these steps:
    1. Navigate to the Audience tab.
    2. If you have more than one audience, click the Current audience drop-down and choose the one you want to work with.
    3. Click on View Contacts.
    4. Click on the Settings drop-down and choose Audience name and defaults.
    5. In the Audience ID section, you’ll see a string of letters and numbers. This is your audience ID.
  • Add the payload based on the attributes in your form.
---
name: mailchimp_new_host
to: 'https://<<YOUR_DC_KEY>>.api.mailchimp.com/3.0/lists/<<YOUR_AUDIENCE_ID>>/members/'
format: http
request_type: POST
request_headers: >
  {
    "Content-Type": "application/json",
    "Authorization": "apikey <<YOUR_API_KEY>>"
  }
---
{
    "email_address":"",
    "status":"subscribed",
    "merge_fields": {
    "FNAME": "",
    "LNAME": ""
    }
}

Step 2: Add API Call Notification to forms

Add the following to the front matter on your form:

api_call_notifications:
  - mailchimp_new_host

Contribute to this page

Github Icon

Questions?

We are always happy to help with any questions you may have.

contact us