Mailchimp Integration Agent

Mailchimp Integration Skill

by hewi333 · MIT license · ★ 122 on GitHub · v1.0.0

Mailchimp Integration Skill cover

Use when integrating with Mailchimp for audience management, campaigns, and automation. Handles API key auth, audience segmentation, and campaign workflows.

---
name: mailchimp-integration
description: "Use when integrating with Mailchimp for audience management, campaigns, and automation. Handles API key auth, audience segmentation, and campaign workflows."
version: "1.0.0"
author: Hermes Agent
license: MIT
metadata:
  hermes:
    tags: [mailchimp, email-marketing, audience-management, campaigns]
    related_skills: [crm-lite, quickbooks-online]
---

# Mailchimp Integration Skill

## Overview
Integrates a small business with Mailchimp for contact management, email campaigns, and automated follow-up sequences. Uses API key authentication. Designed for agent-mediated use: owners text campaign ideas, agent executes Mailchimp API calls.

## When to Use

Overview

Use when integrating with Mailchimp for audience management, campaigns, and automation. Handles API key auth, audience segmentation, and campaign workflows.

Manual install (npx, ZIP)
Claude Codenpx skills add hewi333/Mom-n-Pop-Skills --skill mailchimp-integration -g -a claude-code
Claude Code (degit)npx degit hewi333/Mom-n-Pop-Skills/skills/mailchimp-integration#main ~/.claude/skills/mailchimp-integration
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md7.9 KB
Read SKILL.md here
hewi333/main1 file shown
SKILL.md
Show the full text266 lines

Mailchimp Integration Skill

Overview

Integrates a small business with Mailchimp for contact management, email campaigns, and automated follow-up sequences. Uses API key authentication. Designed for agent-mediated use: owners text campaign ideas, agent executes Mailchimp API calls.

When to Use

  • Import contacts from CSV/export (e.g., a referral partner list of ~2,000 contacts)
  • Segment audiences by region, engagement, last contact date
  • Create/send campaigns (monthly newsletter, seasonal promos, re-engagement)
  • Set up automations (welcome series, estimate follow-up, post-job review request)
  • Track engagement (opens, clicks, unsubscribes) → feed back to CRM

Don't Use For

  • Transactional emails (use Stripe/QuickBooks for invoice emails)
  • SMS marketing (use Twilio)
  • Complex journey builder with branching logic (keep simple)

Authentication

Required Credentials (Environment Variables)
MAILCHIMP_API_KEY=      # From Mailchimp Account → Extras → API Keys
MAILCHIMP_SERVER_PREFIX= # e.g., "us17" (from API key: xxxx-us17)
MAILCHIMP_AUDIENCE_ID=  # Primary audience/list ID (set after first sync)
API Base URL
https://{SERVER_PREFIX}.api.mailchimp.com/3.0/
Authorization: Bearer ***

Core API Operations

Audience Management
# Get audience info
GET /lists/{audience_id}

# Add/update member (upsert by email)
POST /lists/{audience_id}/members
{
  "email_address": "[email protected]",
  "status": "subscribed",
  "merge_fields": {
    "FNAME": "Jane",
    "LNAME": "Smith",
    "COMPANY": "Example Realty",
    "REGION": "Standard",
    "PHONE": "555-555-0199",
    "LEAD_SOURCE": "referral",
    "LAST_CONTACT": "2026-01-10",
    "TAGS": "partner,active"
  },
  "tags": ["partner", "active", "standard_region"]
}

# Batch upsert (for initial import of large contact lists)
POST /lists/{audience_id}/members/batch
{
  "members": [...],
  "update_existing": true
}

# Add tags to member
POST /lists/{audience_id}/members/{subscriber_hash}/tags
{"tags": [{"name": "engaged_30d", "status": "active"}]}

# Archive/unsubscribe
PATCH /lists/{audience_id}/members/{subscriber_hash}
{"status": "unsubscribed"}
Segments (Dynamic Lists)
# Create segment: "Active partners in Standard Region, contacted last 90 days"
POST /lists/{audience_id}/segments
{
  "name": "Standard Region Partners - Active 90d",
  "options": {
    "match": "all",
    "conditions": [
      {"field": "merge_fields.TAGS", "op": "contains", "value": "partner"},
      {"field": "merge_fields.REGION", "op": "eq", "value": "Standard"},
      {"field": "last_changed", "op": "greater", "value": "2025-10-15"}
    ]
  }
}
Campaigns
# Create regular campaign
POST /campaigns
{
  "type": "regular",
  "recipients": {"list_id": "{audience_id}", "segment_opts": {"saved_segment_id": 123}},
  "settings": {
    "subject_line": "Winter Service Special for Your Listings",
    "preview_text": "Exclusive partner pricing through February",
    "title": "Partner Winter Promo - Jan 2026",
    "from_name": "[BUSINESS_NAME]",
    "reply_to": "[email protected]",
    "to_name": "*|FNAME|* *|LNAME|*",
    "folder_id": "campaigns"
  }
}

# Set campaign content (HTML)
PUT /campaigns/{campaign_id}/content
{
  "html": "<html>...",
  "plain_text": "Text version..."
}

# Send test
POST /campaigns/{campaign_id}/actions/test
{"test_emails": ["[email protected]"], "send_type": "html"}

# Send campaign
POST /campaigns/{campaign_id}/actions/send
Automations (Customer Journeys)
# Welcome series for new partner contacts
POST /automations
{
  "type": "welcome",
  "recipients": {"list_id": "{audience_id}"},
  "settings": {
    "title": "Partner Welcome Series",
    "from_name": "[BUSINESS_NAME]",
    "reply_to": "[email protected]",
    "subject_line": "Welcome to [BUSINESS_NAME] Partner Program!",
    "workflow": [
      {"trigger": "subscribed", "delay": "0d", "template": "welcome_email_1"},
      {"delay": "3d", "template": "welcome_email_2_how_it_works"},
      {"delay": "7d", "template": "welcome_email_3_case_study"},
      {"delay": "14d", "template": "welcome_email_4_pricing_guide"}
    ]
  }
}

# Post-job review request (triggered by CRM webhook)
POST /automations
{
  "type": "custom",
  "settings": {
    "title": "Post-Job Review Request",
    "workflow": [
      {"trigger": "api", "event": "job_completed", "template": "review_request_email"}
    ]
  }
}
Reports & Engagement
# Campaign report
GET /reports/{campaign_id}
# Returns: opens, clicks, bounces, unsubscribes, revenue (if ecommerce)

# Member activity
GET /lists/{audience_id}/members/{subscriber_hash}/activity
# Returns: campaign opens/clicks per contact

# Audience growth
GET /lists/{audience_id}/growth-history

Agent Integration Patterns

"Import the partner CSV"
# 1. Parse CSV → normalize fields (region, company, phone)
# 2. Batch upsert to Mailchimp (update_existing=true)
# 3. Auto-tag by region: "standard_region", "premium_region", etc.
# 4. Create segments per region
# 5. Report: "Imported 1,847 contacts, 23 duplicates updated"
"Send monthly newsletter"
# 1. Create campaign from template
# 2. Select segment: "All partners, engaged last 60 days"
# 3. Set content (agent drafts, owner approves)
# 4. Send test → owner approves → send
# 5. Log campaign_id to CRM for tracking
"Re-engagement campaign for cold contacts"
# 1. Segment: "No opens/clicks in 90 days, status=subscribed"
# 2. Create "We miss you" campaign with special offer
# 3. Send → track re-engagement → move responders back to active
# 4. Archive non-responders after 30 days
"Sync CRM lead to Mailchimp"
# When new lead enters CRM:
mailchimp.upsert_member(
    email=lead.email,
    merge_fields={
        "FNAME": lead.contact_name.split()[0],
        "COMPANY": lead.company,
        "REGION": detect_region(lead.property_address),
        "LEAD_SOURCE": lead.source,
        "LAST_CONTACT": datetime.now().isoformat()
    },
    tags=["lead", "new"]
)

Common Pitfalls

  1. Subscriber hash — MD5 lowercase of email; cache it to avoid recomputing
  2. Rate limits — 10 req/sec (burst), 1000/minute; batch operations for imports
  3. Merge field names — Must match audience exactly (case-sensitive); create in UI first
  4. Tags vs merge fields — Tags for dynamic segments; merge fields for personalization
  5. GDPR/CAN-SPAM — Always include unsubscribe footer; honor opt-outs immediately
  6. Image hosting — Use Mailchimp Content Studio or external CDN (not local paths)
  7. Test sends — Always send test to the owner before live send

Verification Checklist

  • API key authenticates, returns account info
  • Batch import of contacts completes without errors
  • Segments by region return correct counts
  • Campaign creation → test send → live send works
  • Automation triggers on API event
  • Reports show opens/clicks per contact
  • Unsubscribe flow works and syncs to CRM

One-Shot Recipes

"Quick audience health check"
health = mailchimp.audience_health(audience_id)
# Returns: {total: N, subscribed: N, unsubscribed: N, cleaned: N, 
#           engaged_30d: N, engaged_90d: N, by_region: {...}}
"Create partner segment for outreach"
segment = mailchimp.create_segment(
    name="Standard Region Partners - Active",
    conditions=[
        {"field": "TAGS", "op": "contains", "value": "partner"},
        {"field": "REGION", "op": "eq", "value": "Standard"},
        {"field": "last_open", "op": "greater", "value": "90d"}
    ]
)
1---
2name: mailchimp-integration
3description: "Use when integrating with Mailchimp for audience management, campaigns, and automation. Handles API key auth, audience segmentation, and campaign workflows."
4version: "1.0.0"
5author: Hermes Agent
6license: MIT
7metadata:
8 hermes:
9 tags: [mailchimp, email-marketing, audience-management, campaigns]
10 related_skills: [crm-lite, quickbooks-online]
11---
12 
13# Mailchimp Integration Skill
14 
15## Overview
16Integrates a small business with Mailchimp for contact management, email campaigns, and automated follow-up sequences. Uses API key authentication. Designed for agent-mediated use: owners text campaign ideas, agent executes Mailchimp API calls.
17 
18## When to Use
19- **Import contacts** from CSV/export (e.g., a referral partner list of ~2,000 contacts)
20- **Segment audiences** by region, engagement, last contact date
21- **Create/send campaigns** (monthly newsletter, seasonal promos, re-engagement)
22- **Set up automations** (welcome series, estimate follow-up, post-job review request)
23- **Track engagement** (opens, clicks, unsubscribes) → feed back to CRM
24 
25## Don't Use For
26- Transactional emails (use Stripe/QuickBooks for invoice emails)
27- SMS marketing (use Twilio)
28- Complex journey builder with branching logic (keep simple)
29 
30## Authentication
31 
32### Required Credentials (Environment Variables)
33```
34MAILCHIMP_API_KEY= # From Mailchimp Account → Extras → API Keys
35MAILCHIMP_SERVER_PREFIX= # e.g., "us17" (from API key: xxxx-us17)
36MAILCHIMP_AUDIENCE_ID= # Primary audience/list ID (set after first sync)
37```
38 
39### API Base URL
40```
41https://{SERVER_PREFIX}.api.mailchimp.com/3.0/
42Authorization: Bearer ***
43```
44 
45## Core API Operations
46 
47### Audience Management
48```python
49# Get audience info
50GET /lists/{audience_id}
51 
52# Add/update member (upsert by email)
53POST /lists/{audience_id}/members
54{
55 "email_address": "[email protected]",
56 "status": "subscribed",
57 "merge_fields": {
58 "FNAME": "Jane",
59 "LNAME": "Smith",
60 "COMPANY": "Example Realty",
61 "REGION": "Standard",
62 "PHONE": "555-555-0199",
63 "LEAD_SOURCE": "referral",
64 "LAST_CONTACT": "2026-01-10",
65 "TAGS": "partner,active"
66 },
67 "tags": ["partner", "active", "standard_region"]
68}
69 
70# Batch upsert (for initial import of large contact lists)
71POST /lists/{audience_id}/members/batch
72{
73 "members": [...],
74 "update_existing": true
75}
76 
77# Add tags to member
78POST /lists/{audience_id}/members/{subscriber_hash}/tags
79{"tags": [{"name": "engaged_30d", "status": "active"}]}
80 
81# Archive/unsubscribe
82PATCH /lists/{audience_id}/members/{subscriber_hash}
83{"status": "unsubscribed"}
84```
85 
86### Segments (Dynamic Lists)
87```python
88# Create segment: "Active partners in Standard Region, contacted last 90 days"
89POST /lists/{audience_id}/segments
90{
91 "name": "Standard Region Partners - Active 90d",
92 "options": {
93 "match": "all",
94 "conditions": [
95 {"field": "merge_fields.TAGS", "op": "contains", "value": "partner"},
96 {"field": "merge_fields.REGION", "op": "eq", "value": "Standard"},
97 {"field": "last_changed", "op": "greater", "value": "2025-10-15"}
98 ]
99 }
100}
101```
102 
103### Campaigns
104```python
105# Create regular campaign
106POST /campaigns
107{
108 "type": "regular",
109 "recipients": {"list_id": "{audience_id}", "segment_opts": {"saved_segment_id": 123}},
110 "settings": {
111 "subject_line": "Winter Service Special for Your Listings",
112 "preview_text": "Exclusive partner pricing through February",
113 "title": "Partner Winter Promo - Jan 2026",
114 "from_name": "[BUSINESS_NAME]",
115 "reply_to": "[email protected]",
116 "to_name": "*|FNAME|* *|LNAME|*",
117 "folder_id": "campaigns"
118 }
119}
120 
121# Set campaign content (HTML)
122PUT /campaigns/{campaign_id}/content
123{
124 "html": "<html>...",
125 "plain_text": "Text version..."
126}
127 
128# Send test
129POST /campaigns/{campaign_id}/actions/test
130{"test_emails": ["[email protected]"], "send_type": "html"}
131 
132# Send campaign
133POST /campaigns/{campaign_id}/actions/send
134```
135 
136### Automations (Customer Journeys)
137```python
138# Welcome series for new partner contacts
139POST /automations
140{
141 "type": "welcome",
142 "recipients": {"list_id": "{audience_id}"},
143 "settings": {
144 "title": "Partner Welcome Series",
145 "from_name": "[BUSINESS_NAME]",
146 "reply_to": "[email protected]",
147 "subject_line": "Welcome to [BUSINESS_NAME] Partner Program!",
148 "workflow": [
149 {"trigger": "subscribed", "delay": "0d", "template": "welcome_email_1"},
150 {"delay": "3d", "template": "welcome_email_2_how_it_works"},
151 {"delay": "7d", "template": "welcome_email_3_case_study"},
152 {"delay": "14d", "template": "welcome_email_4_pricing_guide"}
153 ]
154 }
155}
156 
157# Post-job review request (triggered by CRM webhook)
158POST /automations
159{
160 "type": "custom",
161 "settings": {
162 "title": "Post-Job Review Request",
163 "workflow": [
164 {"trigger": "api", "event": "job_completed", "template": "review_request_email"}
165 ]
166 }
167}
168```
169 
170### Reports & Engagement
171```python
172# Campaign report
173GET /reports/{campaign_id}
174# Returns: opens, clicks, bounces, unsubscribes, revenue (if ecommerce)
175 
176# Member activity
177GET /lists/{audience_id}/members/{subscriber_hash}/activity
178# Returns: campaign opens/clicks per contact
179 
180# Audience growth
181GET /lists/{audience_id}/growth-history
182```
183 
184## Agent Integration Patterns
185 
186### "Import the partner CSV"
187```python
188# 1. Parse CSV → normalize fields (region, company, phone)
189# 2. Batch upsert to Mailchimp (update_existing=true)
190# 3. Auto-tag by region: "standard_region", "premium_region", etc.
191# 4. Create segments per region
192# 5. Report: "Imported 1,847 contacts, 23 duplicates updated"
193```
194 
195### "Send monthly newsletter"
196```python
197# 1. Create campaign from template
198# 2. Select segment: "All partners, engaged last 60 days"
199# 3. Set content (agent drafts, owner approves)
200# 4. Send test → owner approves → send
201# 5. Log campaign_id to CRM for tracking
202```
203 
204### "Re-engagement campaign for cold contacts"
205```python
206# 1. Segment: "No opens/clicks in 90 days, status=subscribed"
207# 2. Create "We miss you" campaign with special offer
208# 3. Send → track re-engagement → move responders back to active
209# 4. Archive non-responders after 30 days
210```
211 
212### "Sync CRM lead to Mailchimp"
213```python
214# When new lead enters CRM:
215mailchimp.upsert_member(
216 email=lead.email,
217 merge_fields={
218 "FNAME": lead.contact_name.split()[0],
219 "COMPANY": lead.company,
220 "REGION": detect_region(lead.property_address),
221 "LEAD_SOURCE": lead.source,
222 "LAST_CONTACT": datetime.now().isoformat()
223 },
224 tags=["lead", "new"]
225)
226```
227 
228## Common Pitfalls
229 
2301. **Subscriber hash** — MD5 lowercase of email; cache it to avoid recomputing
2312. **Rate limits** — 10 req/sec (burst), 1000/minute; batch operations for imports
2323. **Merge field names** — Must match audience exactly (case-sensitive); create in UI first
2334. **Tags vs merge fields** — Tags for dynamic segments; merge fields for personalization
2345. **GDPR/CAN-SPAM** — Always include unsubscribe footer; honor opt-outs immediately
2356. **Image hosting** — Use Mailchimp Content Studio or external CDN (not local paths)
2367. **Test sends** — Always send test to the owner before live send
237 
238## Verification Checklist
239- [ ] API key authenticates, returns account info
240- [ ] Batch import of contacts completes without errors
241- [ ] Segments by region return correct counts
242- [ ] Campaign creation → test send → live send works
243- [ ] Automation triggers on API event
244- [ ] Reports show opens/clicks per contact
245- [ ] Unsubscribe flow works and syncs to CRM
246 
247## One-Shot Recipes
248 
249### "Quick audience health check"
250```python
251health = mailchimp.audience_health(audience_id)
252# Returns: {total: N, subscribed: N, unsubscribed: N, cleaned: N,
253# engaged_30d: N, engaged_90d: N, by_region: {...}}
254```
255 
256### "Create partner segment for outreach"
257```python
258segment = mailchimp.create_segment(
259 name="Standard Region Partners - Active",
260 conditions=[
261 {"field": "TAGS", "op": "contains", "value": "partner"},
262 {"field": "REGION", "op": "eq", "value": "Standard"},
263 {"field": "last_open", "op": "greater", "value": "90d"}
264 ]
265)
266```
View all files on GitHub →

Details

Version
1.0.0
License
MIT
Stars on the repo
★ 122
Checked
Source
hewi333/Mom-n-Pop-Skills ↗
Creator
hewi333 · 12 listings
View creator

Similar skills

See all →
SkillAPI Interface Designaddyosmani/agent-skills · by addyosmaniGuides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.★ 98.7k GitHub starsAgentVersion-Specific Docs Lookupupstash/context7 · by upstashPulls up-to-date, version-specific library docs and code examples into the prompt so the AI stops inventing old APIs.★ 62.3k GitHub starsSkillAdaptyv Bio Foundry APIK-Dense-AI/scientific-agent-skills · by K-Dense-AIHow to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.★ 46k GitHub starsSkill.NET Backend Developerwshobson/agents · by wshobsonMaster C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.★ 39.9k GitHub starsSkillGemini Agent API Guidegoogle/skills · by googleGuides the usage of Gemini Interactions API on Gemini Enterprise Agent Platform. Use when the user wants to use the stateful, server-managed Interactions API for multi-turn conversations, background execution, streaming, structured output, and function calling on the Agent Platform.★ 20.9k GitHub starsSkillGemini Notebook Automationteng-lin/notebooklm-py · by teng-linInstall, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API. Do not use for the generic Gemini API or unrelated content creation.★ 19.6k GitHub stars

More from hewi333

SkillConstruction Project Managerhewi333/Mom-n-Pop-Skills · by hewi333Construction company AI agent — orchestrates email (Google Workspace), project management (JobTread Pave API), and file routing for a construction business. Handles email triage, attachment routing to JobTread, project status, task management, and daily briefings via Telegram. Reference implementation for a construction/trades business with an existing email→Drive→PM pipeline.★ 122 GitHub starsSkillLightweight SQLite CRMhewi333/Mom-n-Pop-Skills · by hewi333Use when tracking customer interactions, managing leads, or building a lightweight CRM for small businesses without dedicated CRM software. Stores contacts, leads, activities, estimates, and communications in local SQLite.★ 122 GitHub starsSkillService Pricing Calculatorhewi333/Mom-n-Pop-Skills · by hewi333Use when calculating service estimates for jobs. Computes pricing based on square footage, ceiling height, service type, travel distance, and severity tiers. Config-driven — plug in your own rate card.★ 122 GitHub starsSkillBusiness Financial Analyzerhewi333/Mom-n-Pop-Skills · by hewi333Analyze business financials from a QuickBooks CSV export. Identifies cost categories, drills down on areas to cut costs, flags low-margin jobs, and spots revenue opportunities. CSV import now, QuickBooks API wiring optional later. Designed for small business owners who don't read spreadsheets — agent translates the numbers into plain English.★ 122 GitHub starsSkillLead-to-Payment Pipelinehewi333/Mom-n-Pop-Skills · by hewi333Use when a new lead arrives (email, Telegram message, or website form) and needs to move through the full pipeline: qualify the lead, generate an estimate, get owner approval, create a payment link, draft a customer email for owner review, and track payment. This is the master flow that orchestrates estimator-engine, crm-lite, stripe-payments, himalaya (IMAP/SMTP), and quickbooks-online. Owner stays in the loop and approves before anything is sent or charged.★ 122 GitHub starsSkillMailchimp Campaign Managerhewi333/Mom-n-Pop-Skills · by hewi333Draft and run Mailchimp email campaigns with AI-generated content, subject line A/B testing, and optimal send timing. Agent drafts the email + subject variants, owner approves in Telegram, agent creates the campaign in Mailchimp. Turns a dormant contact list into an active marketing channel.★ 122 GitHub stars