⌘I

Add subscribers to a Mailchimp list

Updated July 14, 2023
Also available in:

The add or update contact action adds or updates a contact in a Mailchimp audience. Under the hood, this action calls the add or update a list member API endpoint. If the call fails, we’ll retry it for you.

Adding the add or update contact action in the formspree.json file has the same effect as adding the Mailchimp plugin in the Formspree dashboard. See the Mailchimp plugin help article for more information. 

Formspree.json configuration

KeyTypeDescription
app StringMust be mailchimp
type  StringMust be addOrUpdateContact
audience StringYour Mailchimp audience ID (a static value, required; we recommend using an env variable reference). See Find your Mailchimp Audience ID.
apiKey StringYour API key (must be a $ env variable reference, required)

Example

{
  "forms": {
    "contact": {
      "name": "Contact Form",
      "actions": [
        {
          "app": "mailchimp",
          "type": "addOrUpdateContact",
          "audience": "$MAILCHIMP_AUDIENCE",
          "apiKey": "$MAILCHIMP_APIKEY"
        }
      ]
    }
  }
}

Validation rules

The add or update contact action adds the following validation rules implicitly:

FieldValidation Rule
emailRequired
emailType is email

Still have questions? or .