Mailchimp Integration Skill
Use when integrating with Mailchimp for audience management, campaigns, and automation.
by hewi333·MIT license·★ 122 Stars on the repo·GitHub ↗
Use now
npx degit hewi333/Mom-n-Pop-Skills/skills/mailchimp-integration#main ~/.claude/skills/mailchimp-integrationChecked ·commit main
Inside this skill
SKILL.md · the author's own words# Mailchimp Integration Skill ## Overview Integrates a small business with Mailchimp for contact management, email campaigns, and automated follow-up sequences. Uses API key authent… ## 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)
Word-for-word excerpt, not a result. Read the full SKILL.md ↓
Files of Mailchimp Integration Skill
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
- Subscriber hash — MD5 lowercase of email; cache it to avoid recomputing
- Rate limits — 10 req/sec (burst), 1000/minute; batch operations for imports
- Merge field names — Must match audience exactly (case-sensitive); create in UI first
- Tags vs merge fields — Tags for dynamic segments; merge fields for personalization
- GDPR/CAN-SPAM — Always include unsubscribe footer; honor opt-outs immediately
- Image hosting — Use Mailchimp Content Studio or external CDN (not local paths)
- 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 | |
| 2 | name mailchimp-integration |
| 3 | description "Use when integrating with Mailchimp for audience management, campaigns, and automation. Handles API key auth, audience segmentation, and campaign workflows." |
| 4 | version "1.0.0" |
| 5 | author Hermes Agent |
| 6 | license MIT |
| 7 | metadata |
| 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 |
| 16 | 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. |
| 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 | |
| 34 | MAILCHIMP_API_KEY= # From Mailchimp Account → Extras → API Keys |
| 35 | MAILCHIMP_SERVER_PREFIX= # e.g., "us17" (from API key: xxxx-us17) |
| 36 | MAILCHIMP_AUDIENCE_ID= # Primary audience/list ID (set after first sync) |
| 37 | |
| 38 | |
| 39 | ### API Base URL |
| 40 | |
| 41 | https://{SERVER_PREFIX}.api.mailchimp.com/3.0/ |
| 42 | Authorization: Bearer *** |
| 43 | |
| 44 | |
| 45 | ## Core API Operations |
| 46 | |
| 47 | ### Audience Management |
| 48 | |
| 49 | # Get audience info |
| 50 | GET /lists/{audience_id} |
| 51 | |
| 52 | # Add/update member (upsert by email) |
| 53 | POST /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) |
| 71 | POST /lists/{audience_id}/members/batch |
| 72 | { |
| 73 | "members": [...], |
| 74 | "update_existing": true |
| 75 | } |
| 76 | |
| 77 | # Add tags to member |
| 78 | POST /lists/{audience_id}/members/{subscriber_hash}/tags |
| 79 | {"tags": [{"name": "engaged_30d", "status": "active"}]} |
| 80 | |
| 81 | # Archive/unsubscribe |
| 82 | PATCH /lists/{audience_id}/members/{subscriber_hash} |
| 83 | {"status": "unsubscribed"} |
| 84 | |
| 85 | |
| 86 | ### Segments (Dynamic Lists) |
| 87 | |
| 88 | # Create segment: "Active partners in Standard Region, contacted last 90 days" |
| 89 | POST /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 | |
| 105 | # Create regular campaign |
| 106 | POST /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) |
| 122 | PUT /campaigns/{campaign_id}/content |
| 123 | { |
| 124 | "html": "<html>...", |
| 125 | "plain_text": "Text version..." |
| 126 | } |
| 127 | |
| 128 | # Send test |
| 129 | POST /campaigns/{campaign_id}/actions/test |
| 130 | {"test_emails": ["[email protected]"], "send_type": "html"} |
| 131 | |
| 132 | # Send campaign |
| 133 | POST /campaigns/{campaign_id}/actions/send |
| 134 | |
| 135 | |
| 136 | ### Automations (Customer Journeys) |
| 137 | |
| 138 | # Welcome series for new partner contacts |
| 139 | POST /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) |
| 158 | POST /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 | |
| 172 | # Campaign report |
| 173 | GET /reports/{campaign_id} |
| 174 | # Returns: opens, clicks, bounces, unsubscribes, revenue (if ecommerce) |
| 175 | |
| 176 | # Member activity |
| 177 | GET /lists/{audience_id}/members/{subscriber_hash}/activity |
| 178 | # Returns: campaign opens/clicks per contact |
| 179 | |
| 180 | # Audience growth |
| 181 | GET /lists/{audience_id}/growth-history |
| 182 | |
| 183 | |
| 184 | ## Agent Integration Patterns |
| 185 | |
| 186 | ### "Import the partner CSV" |
| 187 | |
| 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 | |
| 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 | |
| 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 | |
| 214 | # When new lead enters CRM: |
| 215 | mailchimp.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 | |
| 230 | **Subscriber hash** — MD5 lowercase of email; cache it to avoid recomputing |
| 231 | **Rate limits** — 10 req/sec (burst), 1000/minute; batch operations for imports |
| 232 | **Merge field names** — Must match audience exactly (case-sensitive); create in UI first |
| 233 | **Tags vs merge fields** — Tags for dynamic segments; merge fields for personalization |
| 234 | **GDPR/CAN-SPAM** — Always include unsubscribe footer; honor opt-outs immediately |
| 235 | **Image hosting** — Use Mailchimp Content Studio or external CDN (not local paths) |
| 236 | **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 | |
| 251 | health = 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 | |
| 258 | segment = 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 |
Discussion
Alternatives
API and interface designGuides 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.Context7Pulls up-to-date, version-specific library docs and code examples into the prompt so the AI stops inventing old APIs.Context7 Documentation LookupFetch up-to-date documentation and code examples for any library, framework, SDK, CLI tool, or cloud service. Use whenever the user asks about a specific library — even well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot — because training data may not reflect recent API changes or version updates. Always use for: API syntax questions, configuration options, version migration issues, "how do I" questions mentioning a library name, debugging that involves library-specific behavior, setup instructions, and CLI tool usage. Use even when you think you know the answer. Do not rely on training data for API details, signatures, or configuration options — they are frequently out of date. Prefer this over web search for library documentation.Adaptyv Bio Foundry APIHow 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`.
Browse more free Claude skills or everything in Development.