Connectors

/

Mailchimp

/

Apply Mailchimp unsubscribes to HubSpot subscriptions
Write
Cross-Connector

Honor Mailchimp opt outs in HubSpot too

For marketing teams who send from Mailchimp and HubSpot and need campaign unsubscribes respected in both, just by asking their AI assistant.

Try PopdockAI free
Get a live demo
Apply Mailchimp unsubscribes to HubSpot subscriptions
Anyone who unsubscribed from a Mailchimp campaign this month should be unsubscribed from the HubSpot Monthly Digest too.
11 people who unsubscribed from Mailchimp campaigns are still subscribed to Monthly Digest in HubSpot. - Will unsubscribe: 11 people, including dana@northwindtraders.com - Already unsubscribed in HubSpot: 20 - Resubscribed in Mailchimp since: 1, left out - Not in HubSpot: 4 This covers campaign unsubscribes only. Shall I unsubscribe the 11?
Mailchimp
Sample figures. Your results come from your own account.
hubspot-get-subscriptions
mailchimp-get-campaign-unsubscribe
mailchimp-get-list-member
hubspot-get-contact-subscriptions
hubspot-get-contacts
hubspot-unsubscribe-contact

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

Mailchimp

Mailchimp
Run it on your own Mailchimp data.

Connect Mailchimp, pick your AI tool and paste the prompt.

Try PopdockAI free

The problem

Opted out in Mailchimp, still mailed from HubSpot

Someone who unsubscribes from a Mailchimp campaign can still be subscribed in HubSpot and keep getting its marketing email. Catching up means exporting unsubscribes, checking who rejoined and finding each person in HubSpot by hand.

Without PopdockAI

  • Export recent campaign unsubscribes from Mailchimp
  • Check whether each person rejoined the audience
  • Search HubSpot one contact at a time
  • Change subscriptions by hand and hope none were missed

With PopdockAI

  • Recent campaign unsubscribes are read, latest per email
  • People who rejoined the audience are left out
  • HubSpot status is checked by email for the type you name
  • Nothing changes until you confirm, and a sample is rechecked

The prompt

Use this prompt

Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.

Prompt
**Objective:** Unsubscribe from the HubSpot subscription type `{subscription-name}` the people who have unsubscribed in Mailchimp in the last `{lookback-days}` days (default 30), after the user confirms, so HubSpot stops sending marketing email to people who opted out in Mailchimp.

**Step 1: Resolve the HubSpot subscription type**

Call `hubspot-get-subscriptions` with `name.contains` set to `{subscription-name}` and `active` set to true. Exactly one must match. If none or several match, list them (name, purpose, communication-method) and stop. Keep its `subscription-type-id` and `name`.

**Step 2: Unsubscribed people in Mailchimp**

Call `mailchimp-get-campaign-unsubscribe` with `unsubscribe-date.from` set to today minus `{lookback-days}` days (30 if blank). Keep `email`, `first-name`, `last-name`, `unsubscribe-date`, `reason`, `campaign-name` and `list-id`. If an email appears more than once, keep the most recent row. This covers unsubscribes from campaigns only; say so in the report.

**Step 3: Check each person in HubSpot**

For each distinct email address:

* Call `mailchimp-get-list-member` with `email` set to the email. If the member is now subscribed again in the same audience (`list-id`) they unsubscribed from, put them in "resubscribed in Mailchimp since" and leave them out.
* Call `hubspot-get-contact-subscriptions` with `recipient-email` set to the email. Find the row whose `subscription-id` equals the `subscription-type-id` from Step 1. If its `status` is not subscribed (NOT_SUBSCRIBED or equivalent), put the person in "already unsubscribed in HubSpot". If it is subscribed, or its value is unclear, put them in "will unsubscribe" and keep the raw status.
* If no row for that subscription comes back, call `hubspot-get-contacts` with `email` set to the email. If no contact comes back, put the person in "not in HubSpot". If a contact comes back, put them in "will unsubscribe" with HubSpot status "no record".

**Step 4: Confirm**

Show the subscription type name and id, then the groups: will unsubscribe (email, name, Mailchimp unsubscribe date or status, HubSpot current status), already unsubscribed in HubSpot (count), resubscribed in Mailchimp since (list), not in HubSpot (list). Ask the user to confirm the "will unsubscribe" group, or to name people to leave out. Do nothing more until they confirm.

**Step 5: Unsubscribe in HubSpot**

Only after confirmation, call `hubspot-unsubscribe-contact` once per confirmed person, with `email` set to their email and `subscription-id` set to the `subscription-type-id`. Do not send `legal-basis` unless a call fails asking for one; then stop, tell the user GDPR is on for the portal, and ask which legal basis to use before continuing.

**Step 6: Verify and report**

Call `hubspot-get-contact-subscriptions` again for up to 5 of the people you changed and show their new status (HubSpot can take a minute to update). Then the totals: unsubscribed, failed (with the error), already unsubscribed, resubscribed in Mailchimp since, not in HubSpot.

**Rules & Guidelines:**

* `mailchimp-get-campaign-unsubscribe` and `mailchimp-get-list-member` are on the Mailchimp server; `hubspot-get-subscriptions`, `hubspot-get-contact-subscriptions`, `hubspot-get-contacts` and `hubspot-unsubscribe-contact` are on the hubspot server.
* `hubspot-unsubscribe-contact` is the only write tool this prompt may call, once per confirmed person, after Step 4. Do NOT call `hubspot-subscribe-contact`, and call no other hubspot-add, hubspot-update, hubspot-rename, hubspot-remove, hubspot-subscribe, hubspot-unsubscribe or hubspot-import tool.
* Mailchimp is read-only here. Do NOT call `mailchimp-add-list-member`, `mailchimp-update-list-member`, `mailchimp-add-customer`, `mailchimp-update-customer`, `mailchimp-add-segment-member`, `mailchimp-start-automation`, `mailchimp-pause-automation`, `mailchimp-replicate-campaign`, `mailchimp-update-product` or `mailchimp-update-order`.
* This prompt only ever removes consent. Never subscribe or resubscribe anyone in either system.
* Match on email address only, compared case-insensitively with surrounding spaces trimmed. Never match on name alone.

**Validation:**

* If Mailchimp returns no unsubscribed people, say so and stop.
* If everyone is already unsubscribed in HubSpot, resubscribed since, or not in HubSpot, report the counts and stop without asking for confirmation.
* If one unsubscribe call fails, report it with the error and continue with the rest.

Who it's for

One answer, three teams that use it

Marketing operations

Keep opt outs in sync across tools

Carry campaign unsubscribes into HubSpot on a regular basis, so people who left one list stop hearing from the other.

Unsubscribe anyone who left a Mailchimp campaign in the last 60 days from the HubSpot Product Updates subscription.

Privacy officers

Show that unsubscribes are respected

Every change is confirmed and a sample is rechecked afterwards, and you are asked before any GDPR legal basis is added.

Which Mailchimp campaign unsubscribes from this quarter are still subscribed to the HubSpot Newsletter?

Email marketers

Stop mailing people who said no

Avoid complaints and spam reports by making sure HubSpot sends stop when someone opts out in Mailchimp.

Apply this week's Mailchimp unsubscribes to the HubSpot Events subscription type.

How it works

What PopdockAI does when you ask

You name the HubSpot subscription type and the period, and your AI assistant lines up the Mailchimp opt outs against it. It only ever removes consent, and only after you approve.

01

Resolve

It finds the one active HubSpot subscription type you name.

Your AI tool

02

Read

It pulls Mailchimp campaign unsubscribes from the last 30 days or the period you give.

mailchimp-get-campaign-unsubscribe

03

Check

It skips people who rejoined the audience and checks each HubSpot status by email.

mailchimp-get-list-member
hubspot-get-contacts
hubspot-get-contact-subscriptions

04

Confirm

You approve the group to unsubscribe, then it unsubscribes them and rechecks a sample.

Your AI tool

What PopdockAI provides

The tools behind the answer

Ready made tools for Mailchimp and one secure connection to your AI tool. No code, no exports.

get-data

hubspot-get-subscriptions

Returns the email subscription types defined in HubSpot from the HubSpot connector. Filter by name, communication method, active, purpose.
get-data

mailchimp-get-campaign-unsubscribe

Returns the members who unsubscribed from each Mailchimp campaign, with the date and the reason they gave.
get-data

mailchimp-get-list-member

Returns the members (subscribers) of Mailchimp audiences, with subscription status, tags and engagement rating. Filter by email address or status to look someone up.
get-data

hubspot-get-contact-subscriptions

Returns each recipient's email subscription statuses and legal basis from the HubSpot connector. Filter by id, name, status, recipient email.
get-data

hubspot-get-contacts

Returns contact records from HubSpot CRM, with email, phone, company, lifecycle stage, lead status, owner and location from the HubSpot connector. Filter by company id, state region, contact owner, email, last name, create date, company name, record id, lifecycle stage, lead status.
run-action

hubspot-unsubscribe-contact

Unsubscribes an email address from a HubSpot subscription type. Required: Email, Subscription ID. Optional: Legal basis, Legal basis explanation. Writes to HubSpot.
Read only.Nothing in Mailchimp Changes

This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.

How Popdock AI secures your data

The outcome

Opt outs honored in both systems

Try PopdockAI free
Get a live demo

Related use cases

More ways to put this data to work

All Ramp use cases

One prompt template with infinite possibilities.

‍

Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.

Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

Try PopdockAI Free
See Documentation