Connectors

/

HubSpot

/

Change a HubSpot contact's email subscription
Write

Change a contact's HubSpot email preferences the right way

For marketing and support teams handling subscribe and unsubscribe requests in HubSpot, just by asking their AI assistant.

Try PopdockAI free
Get a live demo
Change a HubSpot contact's email subscription
Unsubscribe dana@northwindtraders.com from the HubSpot Webinar Invitations emails.
Dana Whitfield is currently subscribed to Webinar Invitations. - Subscription type: Webinar Invitations, id 4417 - Current status: subscribed, source form submission - New status: not subscribed - Legal basis: none sent unless HubSpot asks for one Shall I unsubscribe dana@northwindtraders.com?
HubSpot
Sample figures. Your results come from your own account.
hubspot-get-subscriptions
hubspot-get-contact-subscriptions
hubspot-subscribe-contact
hubspot-unsubscribe-contact

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

HubSpot

HubSpot
Run it on your own HubSpot data.

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

Try PopdockAI free

The problem

Email preference changes can turn into a compliance problem

Changing a contact's email subscription in HubSpot means finding the right subscription type among many and recording a legal basis where GDPR applies. Resubscribing someone who unsubscribed themselves without their request is a compliance problem.

Without PopdockAI

  • Find the contact and open their subscription settings
  • Pick the right type among many similar ones
  • Remember to record a legal basis
  • Risk resubscribing someone who opted out themselves

With PopdockAI

  • The one matching subscription type is found for you
  • The current status, legal basis and source are shown first
  • Self unsubscribes are only reversed if you confirm they asked
  • The new status is read back after the change

The prompt

Use this prompt

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

Prompt
**Objective:** `{operation}` (subscribe or unsubscribe) `{contact-email}` for the subscription type `{subscription-name}`, with legal basis `{legal-basis}` when GDPR applies.

**Step 1: Resolve the subscription type**

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

**Step 2: Check the current status**

Call `hubspot-get-contact-subscriptions` with `recipient-email` = `{contact-email}`. Find the row whose `subscription-id` matches. Report its current `status`, `legal-basis` and `source-of-status`. If it is already in the requested state, say so and stop.

**Step 3: Confirm**

Show the email, subscription name and ID, current status, new status, and the legal basis and explanation that will be sent. For subscribe, warn that the contact must have agreed to receive these emails. Wait for an explicit yes.

**Step 4: Write**

* subscribe: `hubspot-subscribe-contact` once with `email`, `subscription-id`, and `legal-basis` / `legal-basis-explanation` when given
* unsubscribe: `hubspot-unsubscribe-contact` once with the same

**Step 5: Verify and report**

Call `hubspot-get-contact-subscriptions` again and report the new status.

**Rules & Guidelines:**

* Only the one tool in Step 4 may write, once, after Step 3.
* Do NOT call any other write tool: no other hubspot-add, hubspot-update, hubspot-rename, hubspot-remove, hubspot-subscribe, hubspot-unsubscribe or hubspot-import tool.
* Never resubscribe a contact whose current `source-of-status` shows they unsubscribed themselves unless the user confirms the contact asked for it.

**Validation:**

* If the write fails asking for a legal basis, tell the user GDPR is on for the portal and ask for `{legal-basis}`.
* If `{operation}` is not subscribe or unsubscribe, ask which and stop.

Who it's for

One answer, three teams that use it

Email marketers

Act on unsubscribe requests quickly

Take a contact off one email type in a single message, with their current status checked first.

Unsubscribe priya@contoso.com from the HubSpot Product Updates emails.

Customer support agents

Handle preference requests from tickets

When a customer asks to change what they receive, make the change correctly without knowing HubSpot's settings.

A customer, tom.reyes@fabrikam.com, asked to get the Monthly Newsletter again. Can you resubscribe him in HubSpot?

Privacy officers

Keep consent and legal basis on record

Every change carries a legal basis where GDPR applies, and self unsubscribes are not reversed without a request.

What is the subscription status and legal basis for lee@northwindtraders.com on Webinar Invitations in HubSpot? Unsubscribe him.

How it works

What PopdockAI does when you ask

You give the email, the subscription type and the change, and your AI assistant checks the contact's current status. Nothing changes until you have seen the before and after and said yes.

01

Resolve

It finds the one active HubSpot subscription type you name.

Your AI tool

02

Check

It reads the contact's current status, legal basis and source for that type.

hubspot-get-contact-subscriptions

03

Confirm

You see the current and new status and the legal basis, and say yes.

No items found.

04

Write

It subscribes or unsubscribes the contact and reads the new status back.

Your AI tool

What PopdockAI provides

The tools behind the answer

Ready made tools for HubSpot 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

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.
run-action

hubspot-subscribe-contact

Subscribes an email address to a HubSpot subscription type. Required: Email, Subscription ID. Optional: Legal basis, Legal basis explanation. Writes to HubSpot.
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 HubSpot 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

Preference requests handled right the first time

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