PHPackages                             stokoe/forms-to-mailchimp-connector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. stokoe/forms-to-mailchimp-connector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

stokoe/forms-to-mailchimp-connector
===================================

0.1.0(4mo ago)192PHPPHP ^8.2 || ^8.3

Since Nov 15Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/Stokoe-dev/statamic-forms-to-mailchimp-connector)[ Packagist](https://packagist.org/packages/stokoe/forms-to-mailchimp-connector)[ RSS](/packages/stokoe-forms-to-mailchimp-connector/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

Forms To Mailchimp Connector
============================

[](#forms-to-mailchimp-connector)

**Seamlessly connect your Statamic forms to Mailchimp** - Automatically add form submissions to your Mailchimp lists with advanced field mapping and configuration options.

🔗 Related Connectors
--------------------

[](#-related-connectors)

This connector is part of the **Forms To Wherever** ecosystem. Check out our other connectors:

- **[Forms To Wherever](https://statamic.com/addons/stokoe/forms-to-wherever)** - Base package (required)
- **[Forms To HubSpot](https://statamic.com/addons/stokoe/forms-to-hubspot-connector)** - HubSpot CRM integration
- **[Forms To ConvertKit](https://statamic.com/addons/stokoe/forms-to-convertkit-connector)** - ConvertKit email marketing
- **[Forms To ActiveCampaign](https://statamic.com/addons/stokoe/forms-to-activecampaign-connector)** - ActiveCampaign automation
- **[Forms To Salesforce](https://statamic.com/addons/stokoe/forms-to-salesforce-connector)** - Salesforce CRM integration

Features
--------

[](#features)

- **Automatic subscriber addition** to any Mailchimp list
- **Custom field mapping** - Map form fields to Mailchimp merge fields
- **Double opt-in support** - Choose between immediate subscription or email confirmation
- **Comprehensive error handling** - Detailed logging for debugging
- **Production-ready** - Built with security and reliability in mind

Requirements
------------

[](#requirements)

- [Forms To Wherever](https://statamic.com/addons/stokoe/forms-to-wherever) base addon
- Mailchimp account with API access
- PHP 8.2+
- Statamic 5.0+

Installation
------------

[](#installation)

1. Install the base Forms To Wherever addon:

```
composer require stokoe/forms-to-wherever
```

2. Install this Mailchimp connector:

```
composer require stokoe/forms-to-mailchimp-connector
```

Configuration
-------------

[](#configuration)

### 1. Get Your Mailchimp API Key

[](#1-get-your-mailchimp-api-key)

1. Log into your Mailchimp account
2. Go to **Account → Extras → API keys**
3. Create a new API key or copy an existing one
4. Note the datacenter (e.g., `us1`, `us2`) from the end of your API key

### 2. Get Your List ID

[](#2-get-your-list-id)

1. In Mailchimp, go to **Audience → All contacts**
2. Click **Settings → Audience name and defaults**
3. Copy the **Audience ID** (this is your List ID)

### 3. Configure Your Form

[](#3-configure-your-form)

Add the `form_connectors` field to your form blueprint:

```
fields:
  # Your existing form fields...
  -
    handle: connectors
    field:
      type: form_connectors
      display: Form Connectors
```

### 4. Enable Mailchimp in Control Panel

[](#4-enable-mailchimp-in-control-panel)

1. Edit your form in the Statamic Control Panel
2. Navigate to the "Form Connectors" section
3. Enable the **Mailchimp** connector
4. Configure the settings:
    - **API Key**: Your Mailchimp API key
    - **List ID**: Your Mailchimp audience ID
    - **Email Field**: Form field containing email (default: `email`)
    - **Double Opt-in**: Enable for email confirmation requirement
    - **Field Mapping**: Map form fields to Mailchimp merge fields

Field Mapping
-------------

[](#field-mapping)

Map your form fields to Mailchimp merge fields for rich subscriber data:

Form FieldMailchimp Merge TagDescription`first_name``FNAME`First name`last_name``LNAME`Last name`phone``PHONE`Phone number`company``COMPANY`Company name`website``WEBSITE`Website URL### Custom Merge Fields

[](#custom-merge-fields)

You can create custom merge fields in Mailchimp and map them:

1. In Mailchimp: **Audience → Settings → Audience fields and *|MERGE|* tags**
2. Add your custom field and note the merge tag
3. Map your form field to the custom merge tag in the connector settings

Example Form
------------

[](#example-form)

```
# resources/forms/newsletter.yaml
title: Newsletter Signup
fields:
  -
    handle: email
    field:
      type: email
      display: Email Address
      validate: required|email
  -
    handle: first_name
    field:
      type: text
      display: First Name
      validate: required
  -
    handle: last_name
    field:
      type: text
      display: Last Name
  -
    handle: company
    field:
      type: text
      display: Company
  -
    handle: connectors
    field:
      type: form_connectors
      display: Form Connectors
```

Error Handling
--------------

[](#error-handling)

The connector includes comprehensive error handling:

- **Invalid API keys** - Logs warning and skips processing
- **Missing email addresses** - Logs warning with context
- **API failures** - Logs detailed error information
- **Network timeouts** - 10-second timeout with graceful failure

All errors are logged to your Laravel log files for debugging.

Double Opt-in
-------------

[](#double-opt-in)

When enabled, subscribers will receive a confirmation email before being added to your list:

- **Enabled**: Subscriber status set to `pending`, confirmation email sent
- **Disabled**: Subscriber immediately added with `subscribed` status

Asynchronous Processing
-----------------------

[](#asynchronous-processing)

By default, Mailchimp API calls are processed asynchronously using Laravel queues to prevent form submission delays. Ensure your queue worker is running:

```
php artisan queue:work
```

To process synchronously (not recommended for production), disable async processing in the form connector settings.

Troubleshooting
---------------

[](#troubleshooting)

### Common Issues

[](#common-issues)

**"Invalid API key format"**

- Ensure your API key includes the datacenter (e.g., `abc123-us1`)
- Verify the API key is active in your Mailchimp account

**"Email not found"**

- Check the "Email Field" setting matches your form field handle
- Ensure the email field contains a valid email address

**"List not found"**

- Verify the List ID is correct
- Ensure the API key has access to the specified list

### Debug Logging

[](#debug-logging)

Enable debug logging to see detailed API interactions:

```
// In your .env file
LOG_LEVEL=debug
```

Check `storage/logs/laravel.log` for detailed connector activity.

Security
--------

[](#security)

- API keys are never logged or exposed in error messages
- All API communications use HTTPS
- Email addresses are validated before sending to Mailchimp
- Comprehensive input sanitization and validation

Available Connectors
--------------------

[](#available-connectors)

- **[HubSpot Connector](https://statamic.com/addons/stokoe/forms-to-hubspot-connector)** - Create and update HubSpot contacts

Support
-------

[](#support)

- **Marketplace**: [Forms To Mailchimp Connector](https://statamic.com/addons/stokoe/forms-to-mailchimp-connector)
- **Base Addon**: [Forms To Wherever](https://statamic.com/addons/stokoe/forms-to-wherever)
- **Mailchimp API**: [Official Documentation](https://mailchimp.com/developer/marketing/api/)

License
-------

[](#license)

MIT License - Build amazing things with it!

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance78

Regular maintenance activity

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~20 days

Recently: every ~26 days

Total

6

Last Release

121d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/38764871?v=4)[stokoe](/maintainers/stokoe)[@StokoE](https://github.com/StokoE)

---

Top Contributors

[![Michael-Stokoe](https://avatars.githubusercontent.com/u/2981213?v=4)](https://github.com/Michael-Stokoe "Michael-Stokoe (7 commits)")

### Embed Badge

![Health badge](/badges/stokoe-forms-to-mailchimp-connector/health.svg)

```
[![Health](https://phpackages.com/badges/stokoe-forms-to-mailchimp-connector/health.svg)](https://phpackages.com/packages/stokoe-forms-to-mailchimp-connector)
```

###  Alternatives

[statamic/seo-pro

68488.6k](/packages/statamic-seo-pro)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)[statamic/ssg

Generate static sites with Statamic.

254319.5k](/packages/statamic-ssg)[rias/statamic-redirect

29322.9k](/packages/rias-statamic-redirect)[spatie/statamic-responsive-images

Responsive Images for Statamic

114250.6k](/packages/spatie-statamic-responsive-images)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

23100.9k12](/packages/marcorieser-statamic-livewire)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
