Connect HubSpot
This article shows you how to create a HubSpot key, connect HubSpot to PlayerMagick, send the emails a gate collects to a HubSpot static list, and start HubSpot workflows from what people watch.
Available on: Pro, Business and Agency plans.
Before you start
- You need a HubSpot account and a super admin user (only super admins can create the key below).
- Only the PlayerMagick account owner or an admin can connect HubSpot. See Understand team roles.
HubSpot sometimes renames its menus. If a label below does not match exactly, look for the closest one.
Step 1: Create a key in HubSpot
Use a Service Key or, if your account doesn't have Service Keys yet, a private app token.
- Log in to HubSpot.
- Go to Settings → Integrations → Service Keys (or Development → Legacy apps → Create legacy app → Private for a private app).
- Name it
PlayerMagickand give it these scopes:crm.objects.contacts.readandcrm.objects.contacts.writecrm.lists.readandcrm.lists.writecrm.schemas.contacts.readandcrm.schemas.contacts.write(so PlayerMagick can create itspm_idproperty)analytics.behavioral_events.send(only for Send an event, Enterprise plans)
- Create it and copy the key or token.
Step 2: Connect HubSpot in PlayerMagick
- Go to Settings → Integrations.
- Click Connect an email tool and choose HubSpot.
- Paste the key into Service key or private app token.
- Click Test and connect.
Step 3: Choose a list for a gate
- Open your video, click the Interactions tab and click the email gate.
- Under Send leads to, choose your HubSpot account and a List. Only static lists are shown: HubSpot doesn't let other apps add people to active lists.
- Click Save destination.
- Confirmation emails: HubSpot has no confirmation email for contacts added by other apps. The contact is added at once; PlayerMagick never changes their email subscriptions.
- Tags: HubSpot has no tags. Use a static list or a property instead.
Start HubSpot workflows from what people watch
Build your workflow to enroll contacts when they join a static list or when a property changes. Then, in a PlayerMagick automation, use:
- Add to a list / Remove from a list (static lists, for people already in HubSpot), or
- Update a field (any contact property you can edit).
Send an event to HubSpot sends a custom event (HubSpot Enterprise only). First define the event in HubSpot: its internal name must be pe{your hub ID}_ followed by the event name in lower case with _ for spaces, for example pe1234567_playermagick_watched_50 for PlayerMagick: Watched 50%. Without an Enterprise plan, the action shows Not offered.
Recognise viewers from your HubSpot emails
HubSpot's record IDs are numbers that are easy to guess, so PlayerMagick uses its own random ID:
- PlayerMagick creates a contact property called
pm_id(label "PlayerMagick ID") and fills it for every contact it adds or updates. - In Automations → Recognise viewers from your emails, choose HubSpot and click Fill it for my existing contacts.
- Add this to the end of the links in your HubSpot marketing emails:
?pm_hs={{ contact.pm_id }}
Send yourself a test email and use Check a link.
Good to know
- Someone who opted out of all email (or hard-bounced) in HubSpot is never added again. Leads shows Not added.
- Speed: HubSpot allows about 100 requests every 10 seconds on Free and Starter plans; PlayerMagick spaces its requests to match.
- HubSpot recommends replacing private app tokens every 6 months. Use Replace key on the card after you rotate it.
Error messages
| Message | What to do |
|---|---|
| "HubSpot did not accept this key. Check that you copied the whole key." | Copy the key or token again. A deleted or rotated token stops working. |
| "This key can't read your lists. Use a key of a user who can manage contacts." | Add the crm.lists.read and crm.lists.write scopes to the key. |
| "HubSpot didn't answer. Try again in a minute." | Try again in a minute. |
All statuses and fixes: Fix an email tool error.