Mailchimp
Let an agent keep your audiences current without the run of your account. It reads audiences, members and campaigns, adds and tags members, writes notes and works static segments, and changing a member's status, sending a test or scheduling a campaign can wait for a person.
- host
- api.mailchimp.com
- connect
- API key, per user
Upsert member
mailchimp-upsert-member
Update member name
mailchimp-update-member-name
Set member status
mailchimp-set-member-status
Add member tag
mailchimp-add-member-tag
Reads and writes in Mailchimp. Writes are off until you switch them on.
Each one is a named operation from the pack. Reads change nothing.
Writes
Upsert member
read backmailchimp-upsert-member
Add one person to an audience, or update their name if they are already in it. A new member gets status_if_new; an existing member keeps their status, so this never changes someone's consent (use set-member-status for that). subscribed adds them without a confirmation email; pending sends Mailchimp's opt-in email; transactional receives no campaigns.
Update member name
read backmailchimp-update-member-name
Replace one member's first and last name.
Set member status
read backmailchimp-set-member-status
Change one member's subscription status: unsubscribed stops campaigns to them; pending sends Mailchimp's opt-in email; subscribed adds them back without one. This is the person's consent, so do it on their request.
Add member tag
read backmailchimp-add-member-tag
Add one tag to a member. A tag that does not exist yet is created.
Remove member tag
read backmailchimp-remove-member-tag
Remove one tag from a member. The tag stays in the audience.
Add member note
read backmailchimp-add-member-note
Add one note to a member, up to 1,000 characters. Notes are internal; the member never sees them.
Archive member
read backmailchimp-archive-member
Archive one member: they leave the audience and receive nothing more, and their history is kept. Adding them again with upsert-member brings them back.
Add to segment
read backmailchimp-add-to-segment
Add one member, by email address, to a static segment or tag.
Remove from segment
read backmailchimp-remove-from-segment
Remove one member from a static segment or tag. The member stays in the audience.
Send test email
acknowledgedmailchimp-send-test-email
Send a test of one campaign to the addresses given, as HTML or plain text. The campaign itself is not sent. Counted in emails, one per address.
Schedule campaign
read backmailchimp-schedule-campaign
Schedule one draft campaign to go to its whole audience at a UTC time on the quarter hour. This is a send to many people; check recipients.recipient_count with get-campaign first.
Unschedule campaign
read backmailchimp-unschedule-campaign
Unschedule one scheduled campaign, so it goes back to a draft and is not sent.
Reads
List audiences
mailchimp-list-audiences
List the account's audiences (Mailchimp's lists): id, name, created date, and member and unsubscribe counts. 20 a page; total_items gives the total, and offset pages on.
Get audience
mailchimp-get-audience
Get one audience by id: name, contact details, campaign defaults, permission reminder, subscribe URL and stats.
Search members
mailchimp-search-members
Find members by email address or by first or last name, in one audience or all of them: id, email, name, status and audience. Mailchimp answers exact matches and a fuller search in one response, with no next page.
List members
mailchimp-list-members
List an audience's members, most recently changed first: id, email, name, status, tags and when they last changed. 20 a page; filter by status. total_items gives the total, and offset pages on.
Get member
mailchimp-get-member
Get one member of an audience by email address or member id: status, name and merge fields, tags (up to 50), language, VIP, location, stats and when they opted in.
List member tags
mailchimp-list-member-tags
List the tags on one member, with each tag's id, name and when it was added. 50 a page; total_items gives the total, and offset pages on.
List member notes
mailchimp-list-member-notes
List the notes on one member, newest first: id, text, author and dates. 10 a page; total_items gives the total, and offset pages on.
Get member activity
mailchimp-get-member-activity
Get one member's recent activity, newest first: opens, clicks, bounces, sign-ups, notes and other events, each with its type and date. 20 a page; filter by activity type; offset pages on.
List segments
mailchimp-list-segments
List an audience's segments and tags (a tag is a static segment): id, name, type and member count. 20 a page; filter by type; total_items gives the total, and offset pages on.
List segment members
mailchimp-list-segment-members
List the members of one segment or tag: id, email, name and status. 20 a page; total_items gives the total, and offset pages on.
List campaigns
mailchimp-list-campaigns
List campaigns, newest first: id, type, status, title, subject line, audience, recipient count, emails sent and send time. 10 a page; filter by status or audience; total_items gives the total, and offset pages on.
Get campaign
mailchimp-get-campaign
Get one campaign by id: status, settings (title, subject, from name, reply-to), recipients (audience, segment and recipient count), tracking, send time and a report summary once sent.
How do users connect? Each one brings their own Mailchimp.
- 1.Call for the userYour server invokes the action for the signed-in user. Without a Mailchimp connection, the SDK throws EndUserNotConnectedError with a connect link.
- 2.The user pastes a keyThe link opens a form that shows where in Mailchimp's settings to create the key. The link lasts 10 minutes and works once.
- 3.Anlyon checks itThe key is checked with Mailchimp before it is kept, and bound to api.mailchimp.com. It is never shown back.
- 4.Your server confirmsYour server confirms the connection for the user who is signed in, and the call goes through.
Guardrails. Suggested limits and approvals, for you to review.
Suggested limits
- 200 members added or updated a day
- 200 member names updated a day
- 50 member statuses changed a day
- 300 member tags added a day
- 100 member tags removed a day
- 300 member notes a day
- 20 members archived a day
- 200 segment members added a day
- 100 segment members removed a day
- 20 test emails a day
- 3 campaigns scheduled a day
- 10 campaigns unscheduled a day
Suggested approvals
- A person approves adding a new member as subscribed
- A person approves changing a member's status
- A person approves archiving a member
- A person approves sending a campaign test
- A person approves scheduling a campaign
What the key must allow
- An API key you create
- It can do anything your account can
Good to know
- Create the key from a user whose access fits what your agent should reach.
- Mailchimp refuses subscribed for someone who unsubscribed themselves; they confirm a pending status instead.
For your own account
- 1.In Mailchimp, open your profile, Extras, API keys, and create a key.
- 2.In Anlyon, open Actions, then Integrations, choose Mailchimp and paste the key.
- 3.Anlyon checks the key with Mailchimp before storing it. It becomes a secret named MAILCHIMP, bound to api.mailchimp.com.
Mailchimp in your code. For one of your users, or for your own account.
Act for one of your users from your server, or connect your company's own Mailchimp with the CLI.
import { Client, EndUserNotConnectedError } from "@anlyonhq/sdk";const anlyon = new Client({ apiKey: process.env.ANLYON_API_KEY! });try { const { data } = await anlyon .forUser(session.userId) .actions.invoke("mailchimp-add-member-tag", { list_id: "4ca5becb8d", member_id: "62eeb292278cc15f5817cb78f7790b08", tag: "trial" }); return { status: "done", grade: data.grade };} catch (error) { if (error instanceof EndUserNotConnectedError) { // The user connects their own Mailchimp, then you call again. return { status: "connect_required", url: error.connectUrl }; } throw error;}Other integrations. Under the same limits, approvals and receipts.
Available
Stripe
Payments · API key
Refunds under a money ceiling, and every customer, payment and invoice to read.
Available
GitHub
Code · API key
Issues, pull requests and code, in the repositories you choose.
Available
HubSpot
CRM · Sign in
Contacts, companies and deals: search them and change them.
- Anlyon app
- Available
- Your own app
- Recommended for production
