RedPlanetHQ / RedPlanetHQ/core
New Integration: Mailchimp
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 194
- Avg merge
- 12m
- Merged PRs (30d)
- 2
Description
Description
Add Mailchimp integration to sync email campaigns, audience data, automation workflows, and campaign analytics into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/github/- OAuth-based API integrationintegrations/linear/- Project management integrationintegrations/slack/- For reference
Required Files Structure
integrations/mailchimp/
├── src/
│ ├── index.ts # Main entry, OAuth spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Mailchimp API utilities
│ ├── account-create.ts # OAuth setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Mailchimp Marketing API Integration
OAuth Setup
- Use OAuth 2.0 Authorization Code flow
- API Version: 3.0 (v2.0 is deprecated)
- Base URL varies by data center:
https://<dc>.api.mailchimp.com/3.0/ - Alternative: API Key authentication (simpler but less secure)
- Required scopes determined during OAuth app registration
Key Endpoints
GET /campaigns- List all campaignsGET /campaigns/{campaign_id}- Get campaign detailsGET /campaigns/{campaign_id}/send-checklist- Pre-send checklistPOST /campaigns/{campaign_id}/actions/send- Send a campaignGET /lists- List audiences/listsGET /lists/{list_id}/members- List audience membersGET /automations- List automation workflowsGET /reports- List campaign reportsGET /reports/{campaign_id}- Get detailed campaign analyticsGET /reports/{campaign_id}/open-details- Open tracking detailsGET /reports/{campaign_id}/click-details- Click tracking details
Events to Track
- Campaigns - Campaign creation, sending, and completion
- Audience - Subscriber additions, removals, and segment changes
- Automations - Workflow triggers and completions
- Reports - Open rates, click rates, bounce rates, and revenue data
- Templates - Template creation and modifications
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement OAuth 2.0 flow in
account-create.ts - Create API utilities in
utils.tsfor campaigns, audiences, automations, and reports - Implement sync logic in
schedule.tsfor polling campaign and audience data - Convert campaign/audience events to CORE activity format
- Add error handling and rate limiting (10 simultaneous connections max, 120s timeout)
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- API v3.0 is the current version; v2.0 is deprecated and no longer supported
- Base URL includes a data center prefix (e.g.,
us1,us2) that varies per account - Rate limit: 10 simultaneous connections per account; 429 error on exceeded limit
- API calls have a 120-second timeout
- Supports pagination, filtering, and partial responses
- Webhooks available for real-time event notifications
Resources
- Mailchimp Marketing API Documentation
- API Reference
- Quick Start Guide
- Mailchimp Developer Portal
- Tools and SDKs
Labels
enhancement, integration, new-feature
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading integrations/github/src/index.ts and comparing the existing integrations/github/, integrations/linear/, and integrations/slack/ templates. Then work through the specified integrations/mailchimp/ files and Mailchimp API endpoints. Done means the OAuth flow, campaign and audience sync, activity formatting, error handling, documentation, and integrations/README.md entry are implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100