> ## Documentation Index
> Fetch the complete documentation index at: https://www.macaly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Mailchimp

> Add Mailchimp to your Macaly project

Mailchimp lets you collect email subscribers, send newsletters, and run automated email campaigns. If you want to build and nurture a mailing list from your Macaly site, Mailchimp is one of the most popular ways to do it.

<Callout icon="user">
  Available on all plans
</Callout>

<Note>
  **Do you actually need Mailchimp?** Macaly has a [built-in database](/en/features/databases) and email notifications. If you just need a contact form or waitlist, you don't need an external tool. Mailchimp is worth it when you need newsletters, drip campaigns, or audience segmentation.
</Note>

## Why use Mailchimp

* **Grow your list from your site.** Collect subscribers and manage them in one place. Segment by interests, signup source, or behavior.
* **Send newsletters without touching code.** Design and send email campaigns to your audience. Schedule them or send instantly.
* **Automate your follow-ups.** Set up welcome emails, drip sequences, and abandoned cart reminders that run on their own.
* **See what actually works.** Track open rates, click rates, and which links get the most engagement.

## What you need

Before you start, make sure you have:

* A **Mailchimp account**. Create one for free at [mailchimp.com](https://mailchimp.com)
* A **Mailchimp audience** (mailing list) to collect subscribers into

There are two ways to connect Mailchimp to your site:

* **Embedded signup form.** Paste Mailchimp's generated form code into your site. Best for simple email collection.
* **Mailchimp API.** Connect your forms to Mailchimp's API for full control over what data you send. Best when you want custom forms that match your design.

## Option 1: Embedded signup form

The simplest approach. Mailchimp generates a form you can drop into your site.

<Steps>
  <Step title="Get your form embed code">
    In Mailchimp, go to **Audience** then **Signup forms** then **Embedded forms**. Customize the fields you want, then copy the generated HTML code.
  </Step>

  <Step title="Ask the agent to add it">
    Open the chat in your Macaly project and ask:

    ```
    Add this Mailchimp signup form to my site. Here's the embed code:

    [paste your Mailchimp embed code here]
    ```
  </Step>

  <Step title="The agent places the form">
    The agent adds the form to your project. You can tell it exactly where you want it, like the footer, a dedicated page, or a popup.
  </Step>
</Steps>

<Tip>
  If you want the form to match your site's design, tell the agent: *"Style the Mailchimp form to match the rest of my site."*
</Tip>

## Option 2: Custom form with Mailchimp API

For more control, the agent can build a custom form that sends subscribers to Mailchimp through their API.

<Steps>
  <Step title="Add your Mailchimp credentials to Secrets">
    Go to **Settings** then **Secrets** in your Macaly project. Add two secrets:

    * `MAILCHIMP_API_KEY` — your Mailchimp API key
    * `MAILCHIMP_AUDIENCE_ID` — the audience you want subscribers added to

    <Accordion title="How to find your API key and audience ID">
      **API key:**

      1. In Mailchimp, click your profile icon, then **Account & billing**
      2. Go to **Extras** then **API keys**
      3. Click **Create a key** and copy it

      **Audience ID:**

      1. Go to **Audience** then **All contacts**
      2. Click **Settings** then **Audience name and defaults**
      3. Your **Audience ID** is listed on this page
    </Accordion>
  </Step>

  <Step title="Ask the agent to build the form">
    Open the chat and ask:

    ```
    Create a newsletter signup form in the footer. When someone subscribes,
    add them to my Mailchimp audience using the API.
    I've added my API key and audience ID to Secrets.
    ```
  </Step>
</Steps>

<Warning>
  Never paste API keys directly into the chat. Always use **Settings** then **Secrets** to store sensitive credentials. The agent can read them from there securely.
</Warning>

## Verify it's working

<Steps>
  <Step title="Submit a test signup">
    Visit your site and enter a test email address in the signup form.
  </Step>

  <Step title="Check your Mailchimp audience">
    Go to **Audience** then **All contacts** in Mailchimp. Your test email should appear as a new subscriber.
  </Step>
</Steps>

## Good to know

* If you only need to collect emails, Macaly's [built-in database](/en/features/databases) is simpler and doesn't require an external account
* For GDPR compliance, enable **double opt-in** in your Mailchimp audience settings. This sends a confirmation email before adding someone to your list
* The agent can also set up pop-up forms and slide-in forms if you want something more prominent than an inline signup
