Rei-skills mailchimp-automation
Automate Mailchimp email marketing including campaigns, audiences, subscribers, segments, and analytics via Rube MCP (Composio). Always search tools first for current schemas.
git clone https://github.com/rootcastleco/rei-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/rootcastleco/rei-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/mailchimp-automation" ~/.claude/skills/rootcastleco-rei-skills-mailchimp-automation && rm -rf "$T"
skills/mailchimp-automation/SKILL.mdMailchimp Automation via Rube MCP
Automate Mailchimp email marketing workflows including campaign creation and sending, audience/list management, subscriber operations, segmentation, and performance analytics through Composio's Mailchimp toolkit.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Mailchimp connection via
with toolkitRUBE_MANAGE_CONNECTIONSmailchimp - Always call
first to get current tool schemasRUBE_SEARCH_TOOLS
Setup
Get Rube MCP: Add
https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
- Verify Rube MCP is available by confirming
respondsRUBE_SEARCH_TOOLS - Call
with toolkitRUBE_MANAGE_CONNECTIONSmailchimp - If connection is not ACTIVE, follow the returned auth link to complete Mailchimp OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Create and Send Email Campaigns
When to use: User wants to create, configure, test, and send an email campaign.
Tool sequence:
- List available audiences and get list_id [Prerequisite]MAILCHIMP_GET_LISTS_INFO
- Create a new campaign with type, audience, subject, from name [Required]MAILCHIMP_ADD_CAMPAIGN
- Set HTML content for the campaign [Required]MAILCHIMP_SET_CAMPAIGN_CONTENT
- Send preview to reviewers before live send [Optional]MAILCHIMP_SEND_TEST_EMAIL
- Send the campaign immediately [Required]MAILCHIMP_SEND_CAMPAIGN
- Schedule for future delivery instead of immediate send [Optional]MAILCHIMP_SCHEDULE_CAMPAIGN
Key parameters for MAILCHIMP_ADD_CAMPAIGN:
: "regular", "plaintext", "rss", or "variate" (required)type
: Audience/list ID for recipientsrecipients__list__id
: Email subject linesettings__subject__line
: Sender display namesettings__from__name
: Reply-to email address (required for sending)settings__reply__to
: Internal campaign titlesettings__title
: Preview text shown in inboxsettings__preview__text
Key parameters for MAILCHIMP_SET_CAMPAIGN_CONTENT:
: Campaign ID from creation step (required)campaign_id
: Raw HTML content for the emailhtml
: Plain-text version (auto-generated if omitted)plain_text
: Use a pre-built template instead of raw HTMLtemplate__id
Pitfalls:
is irreversible; always send a test email first and get explicit user approvalMAILCHIMP_SEND_CAMPAIGN- Campaign must be in "save" (draft) status with valid audience, subject, from name, verified email, and content before sending
requires a valid future datetime; past timestamps failMAILCHIMP_SCHEDULE_CAMPAIGN- Templates and HTML content must include compliant footer/unsubscribe merge tags
- Mailchimp uses double-underscore notation for nested params (e.g.,
)settings__subject__line
2. Manage Audiences and Subscribers
When to use: User wants to view audiences, list subscribers, or check subscriber details.
Tool sequence:
- List all audiences with member counts [Required]MAILCHIMP_GET_LISTS_INFO
- Get details for a specific audience [Optional]MAILCHIMP_GET_LIST_INFO
- List members with status filter and pagination [Required]MAILCHIMP_LIST_MEMBERS_INFO
- Search by email or name across lists [Optional]MAILCHIMP_SEARCH_MEMBERS
- Get detailed profile for a specific subscriber [Optional]MAILCHIMP_GET_MEMBER_INFO
- List segments within an audience [Optional]MAILCHIMP_LIST_SEGMENTS
Key parameters for MAILCHIMP_LIST_MEMBERS_INFO:
: Audience ID (required)list_id
: "subscribed", "unsubscribed", "cleaned", "pending", "transactional", "archived"status
: Records per page (default 10, max 1000)count
: Pagination offset (default 0)offset
: "timestamp_opt", "timestamp_signup", or "last_changed"sort_field
: Comma-separated list to limit response sizefields
Pitfalls:
andstats.avg_open_rate
are 0-1 fractions, NOT 0-100 percentagesstats.avg_click_rate- Always use
to filter active subscribers; omitting returns all statusesstatus="subscribed" - Must paginate using
andcount
until collected members matchoffsettotal_items - Large list responses may be truncated; data is under
response.data.members
3. Add and Update Subscribers
When to use: User wants to add new subscribers, update existing ones, or bulk-manage list membership.
Tool sequence:
- Validate target audience exists [Prerequisite]MAILCHIMP_GET_LIST_INFO
- Check if contact already exists [Optional]MAILCHIMP_SEARCH_MEMBERS
- Upsert subscriber (create or update) [Required]MAILCHIMP_ADD_OR_UPDATE_LIST_MEMBER
- Add new subscriber (create only) [Optional]MAILCHIMP_ADD_MEMBER_TO_LIST
- Bulk manage segment membership [Optional]MAILCHIMP_BATCH_ADD_OR_REMOVE_MEMBERS
Key parameters for MAILCHIMP_ADD_OR_UPDATE_LIST_MEMBER:
: Audience ID (required)list_id
: MD5 hash of lowercase email (required)subscriber_hash
: Subscriber email (required)email_address
: Status for new subscribers: "subscribed", "pending", etc. (required)status_if_new
: Status for existing subscribersstatus
: Object with merge tag keys (e.g.,merge_fields
){"FNAME": "John", "LNAME": "Doe"}
: Array of tag stringstags
Key parameters for MAILCHIMP_ADD_MEMBER_TO_LIST:
: Audience ID (required)list_id
: Subscriber email (required)email_address
: "subscribed", "pending", "unsubscribed", "cleaned", "transactional" (required)status
Pitfalls:
must be MD5 of the lowercase email; incorrect casing causes 404s or duplicatessubscriber_hash- Use
(upsert) instead ofMAILCHIMP_ADD_OR_UPDATE_LIST_MEMBER
to avoid duplicate errorsMAILCHIMP_ADD_MEMBER_TO_LIST
determines status only for new contacts; existing contacts usestatus_if_newstatus- Use
to bypass required merge field validationskip_merge_validation: true
manages static segment membership, not list membershipMAILCHIMP_BATCH_ADD_OR_REMOVE_MEMBERS
4. View Campaign Reports and Analytics
When to use: User wants to review campaign performance, open rates, click rates, or subscriber engagement.
Tool sequence:
- List sent campaigns with report summaries [Required]MAILCHIMP_LIST_CAMPAIGNS
- Find campaigns by name, subject, or content [Optional]MAILCHIMP_SEARCH_CAMPAIGNS
- Get detailed performance report for a campaign [Required]MAILCHIMP_GET_CAMPAIGN_REPORT
- Bulk fetch reports across multiple campaigns [Optional]MAILCHIMP_LIST_CAMPAIGN_REPORTS
- Get link-level click statistics [Optional]MAILCHIMP_LIST_CAMPAIGN_DETAILS
- Drill into specific link click data [Optional]MAILCHIMP_GET_CAMPAIGN_LINK_DETAILS
- See who clicked a specific link [Optional]MAILCHIMP_LIST_CLICKED_LINK_SUBSCRIBERS
- Get per-subscriber campaign activity [Optional]MAILCHIMP_GET_SUBSCRIBER_EMAIL_ACTIVITY
- Retrieve campaign HTML content [Optional]MAILCHIMP_GET_CAMPAIGN_CONTENT
Key parameters for MAILCHIMP_LIST_CAMPAIGNS:
: "save", "paused", "schedule", "sending", "sent"status
/count
: Pagination (default 10, max 1000)offset
/since_send_time
: ISO 8601 date range filterbefore_send_time
: "create_time" or "send_time"sort_field
: Limit response fields for performancefields
Key parameters for MAILCHIMP_GET_CAMPAIGN_REPORT:
: Campaign ID (required)campaign_id- Returns: opens, clicks, bounces, unsubscribes, timeseries, industry_stats
Pitfalls:
only returns high-levelMAILCHIMP_LIST_CAMPAIGNS
; usereport_summary
for detailed metricsMAILCHIMP_GET_CAMPAIGN_REPORT- Draft/unsent campaigns lack meaningful report data
- When using
parameter on LIST_CAMPAIGNS, explicitly requestfields
andsend_time
subfieldsreport_summary - Pagination defaults are low (10 records); iterate with
andcount
untiloffset
is coveredtotal_items
is ISO 8601 with timezone; parse carefullysend_time
Common Patterns
ID Resolution
Always resolve names to IDs before operations:
- Audience name -> list_id:
and match by nameMAILCHIMP_GET_LISTS_INFO - Subscriber email -> subscriber_hash: Compute MD5 of lowercase email in code
- Campaign name -> campaign_id:
with queryMAILCHIMP_SEARCH_CAMPAIGNS - Segment name -> segment_id:
with list_idMAILCHIMP_LIST_SEGMENTS
Pagination
Mailchimp uses offset-based pagination:
- Use
(page size, max 1000) andcount
(skip N records)offset - Continue until collected records match
from the responsetotal_items - Default
is 10; always set explicitly for bulk operationscount - Search endpoints max at 10 pages (300 results for 30/page)
Subscriber Hash
Many endpoints require
subscriber_hash (MD5 of lowercase email):
import hashlib subscriber_hash = hashlib.md5(email.lower().encode()).hexdigest()
Known Pitfalls
ID Formats
(audience ID) is a short alphanumeric string (e.g., "abc123def4")list_id
is an alphanumeric stringcampaign_id
is an MD5 hex string (32 characters)subscriber_hash- Segment IDs are integers
Rate Limits
- Mailchimp enforces API rate limits; use batching for bulk subscriber operations
- High-volume use of GET_MEMBER_INFO and ADD_OR_UPDATE_LIST_MEMBER can trigger throttling
- Use
for bulk segment operationsMAILCHIMP_BATCH_ADD_OR_REMOVE_MEMBERS
Parameter Quirks
- Nested parameters use double-underscore notation:
,settings__subject__linerecipients__list__id
andavg_open_rate
are 0-1 fractions, not percentagesavg_click_rate
only applies to new contacts in upsert operationsstatus_if_new
must be MD5 of lowercase email; wrong casing creates phantom recordssubscriber_hash- Campaign
is required for creation; most common is "regular"type
returns HTTP 204 on success (no body)MAILCHIMP_SEND_CAMPAIGN
Content and Compliance
- Campaign HTML must include unsubscribe link and physical address (merge tags)
- Content must be set via
before sendingMAILCHIMP_SET_CAMPAIGN_CONTENT - Test emails require campaign to have content already set
Quick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| List audiences | | , |
| Get audience details | | |
| Create campaign | | , , |
| Set campaign content | | , |
| Send test email | | , |
| Send campaign | | |
| Schedule campaign | | , |
| Get campaign info | | |
| Search campaigns | | |
| List campaigns | | , , |
| Replicate campaign | | |
| List subscribers | | , , , |
| Search members | | , |
| Get member info | | , |
| Add subscriber | | , , |
| Upsert subscriber | | , , , |
| Batch members | | , |
| List segments | | |
| Campaign report | | |
| All reports | | , |
| Link click details | | , |
| Subscriber activity | | , |
| Member recent activity | | , |
| Campaign content | | |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
🏰 Rei Skills — Curated by Rootcastle Engineering & Innovation | Batuhan Ayrıbaş
Engineering Beyond Boundaries | admin@rootcastle.com