Add subscribers to a mailing list in Mailchimp

If you want to add new subscribers to a particular list in Mailchimp, this is how you do it:

1- Get List ID and API key from your Mailchimp account:

  • List ID: Lists > Click the List > Settings > List Name and Defaults > List ID
  • API key: top Name > Account > Extras > API Keys > Create a Key

2- Send the request

A1 | List ID
B1 | [Your List ID, e.g. 6f5a55fXXX]
A2 | API Key
B2 | [Your API Key, e.g. 018a987f559e0eca57e448b1d28YYYYY-us13]
A3 | Data center
B3 | =RIGHT(B2,LEN(B2)-FIND("-",B2)) - The data center are the last characters of the API key after the “-”
A5 | Emails
A6 | [new subscriber email, e.g. hello@world.com]
B5 | Request
B6 | =IF(A6>0,POST(“https://”&$B$3&".api.mailchimp.com/3.0/lists/"&$B$1&"/members",’{“Authorization”:“Basic '&BASE64(“anystring:”&$B$2&”")&’",“Content-Type”:“application/json”}’,’{“email_address”:"’&A6&’", “status”:“subscribed”}’))

Now, your app looks like this:
image
It already added the subscriber to the list.

3- Automate the app for many new subscribers
If you want to handle more data at once, e.g. by pasting a list of new subscribers in column A, you can now add in:

C6 | =FILL(B6,COUNTIF(A6:A,">0")-1)

Now when you paste a list of new subscriber emails in A6:A, all these email addresses will be added to your mailing list.

You can check the API documentation for this endpoint here.

1 Like