The HubSpot integration brings your HubSpot contacts and companies into Iterable on a schedule you choose. Use it to keep Iterable user profiles in step with HubSpot, to segment users by lifecycle stage or lead status, and to personalize messages with details about each user's company. For example, you can nurture new leads and onboard new customers as their lifecycle stage changes in HubSpot, so each contact gets the message that fits where they are.
By default, the integration imports your existing HubSpot contacts and companies when you finish setup, then syncs changes on each scheduled run.
# In this article
# How the integration works
The integration syncs two HubSpot objects, each on its own schedule:
- HubSpot contacts become Iterable user profiles.
- HubSpot companies become items in an Iterable catalog, which you can reference from templates.
| HubSpot object | What Iterable stores | Where |
|---|---|---|
| Contact | User profile update | User profile fields |
| Company | Catalog item | Catalog HubSpotCompanies (you can change the name) |
The integration syncs only the properties in the mapping tables, not custom properties. For the default mappings, see Field mappings.
Each user's companyId field holds the ID of the contact's primary HubSpot
company. That value is also the company's catalog item ID, so you can look up
company details, such as name, industry, and size, when you send a message.
See How contacts link to companies.
# How users are matched
The Primary Identifier on the Iterable connection sets how the integration identifies users. You don't select it separately for HubSpot.
| Primary Identifier | HubSpot identifier | Iterable identifier | Supported Iterable project types |
|---|---|---|---|
| Contact email address | email | Hybrid, email-based | |
| User ID | Contact ID |
userId, plus email when the contact has one* | Hybrid, userID-based |
* In a hybrid project, email must also be unique. If another Iterable
user already has the contact's email address, Iterable rejects that update.
Choose the Primary Identifier that matches how your existing Iterable users are identified:
Select User ID if your users'
userIdvalues are HubSpot contact IDs, or if the project has no users yet and you want to identify all imported users by HubSpot contact ID. The integration also adds the contact'semailto the user profile when the contact has one. Not available for email-based projects.Select Email if your users are identified by
email, or byuserIdvalues that aren't HubSpot contact IDs. The integration skips contacts without an email address. Not available for userID-based projects.
To learn more about project types, read Project Types and Unique Identifiers.
# How contacts link to companies
A HubSpot contact can have several associated companies, but only one is its
primary company. The integration writes the primary company's HubSpot ID to the
user's companyId field. That same ID is the company's catalog item ID.
To use company details in a message, look up the catalog item by the user's
companyId.
If a contact has no primary company, the integration clears companyId on the
user profile.
# How existing records are imported
The Backfill Existing Contacts on Activate and Backfill Existing Companies on Activate options import every existing contact or company, oldest first. Both options are on by default.
The import:
- Starts as soon as you finish setup and runs one time.
- Uses the same primary identifier and field mappings as scheduled syncs.
- Can take several back-to-back runs for large HubSpot accounts. Scheduled syncs for that object wait until the import finishes.
If you turn an option off, the integration syncs only contacts or companies that change after setup. The options apply only the first time you finish setup. Changing them later has no effect.
# What isn't synced
The integration doesn't sync:
- Custom properties for contacts and companies.
- Deleted, archived, or merged contacts and companies.
- Secondary (non-primary) company associations.
- Deals, activities, and custom objects.
- Association changes that don't also update the contact in HubSpot.
# Connection requirements
To connect HubSpot to Iterable, you need the following from HubSpot:
- A HubSpot service key with the required scopes.
- A field to identify the user that matches in Iterable:
- If you use email as the primary identifier, an email address on every HubSpot contact.
- If you use user ID as the primary identifier, a HubSpot contact ID that matches your Iterable user IDs.
And you need the following from Iterable:
- Catalog added to your plan, which is required to sync companies. You don't create the catalog or its fields. The integration creates them when you finish setup. To add Catalog to your plan, talk to your Iterable customer success manager. (Contacts sync without Catalog.)
- A server-side API key for the Iterable project that receives the data.
# HubSpot service key scopes
Create the service key with the following scopes:
| Scope | Used for |
|---|---|
crm.objects.contacts.read | Contact sync |
crm.objects.companies.read | Company sync |
# Connecting HubSpot to Iterable
# Step 1: Create a HubSpot service key
- In HubSpot, go to Development > Keys > Service keys.
- Click Create service key and enter a name, such as
Iterable. - Click Add new scope, select the scopes listed in HubSpot service key scopes, and click Update.
- Click Create and confirm.
- Open the key, click Show, then click Copy. You paste the key into Iterable in the next step.
For more information, see HubSpot's service key documentation.
# Step 2: Connect HubSpot and Iterable in the Integrations Hub
In Iterable, go to Integrations > Integrations Hub.
Find HubSpot CRM, select Connect, and then select Add Connection.
On Connections, paste your HubSpot service key. Then enter your Iterable API key and set Primary Identifier to the option that matches how your Iterable users are identified. See How users are matched.
-
On Contact Sync:
- Leave Sync Contacts on to create and update Iterable users from HubSpot contacts. It's on by default.
- Under Contact Sync Cadence, choose how often to sync contacts that changed in HubSpot: Every Hour, Every 3 Hours, Every 6 Hours, Every 12 Hours, or Every 24 Hours. The default is Every Hour. Syncs run at fixed UTC times. For example, Every 24 Hours runs at 00:00 UTC.
- Choose whether to import existing contacts with Backfill Existing Contacts on Activate. See How existing records are imported.
- Review the contact field mappings. See Field mappings.
-
On Company Sync:
- Leave Sync Companies on to create and update catalog items from HubSpot companies. It's on by default.
- Under Catalog Name, enter the Iterable catalog that holds your
companies. The default is
HubSpotCompanies. Use letters, numbers, and hyphens only, up to 255 characters. If the catalog doesn't exist, Iterable creates it when you finish setup. - Under Company Sync Cadence, choose how often to sync companies that changed in HubSpot: Every Hour, Every 3 Hours, Every 6 Hours, Every 12 Hours, or Every 24 Hours. The default is Every Hour. Syncs run at fixed UTC times. For example, Every 24 Hours runs at 00:00 UTC.
- Choose whether to import existing companies with Backfill Existing Companies on Activate. See How existing records are imported.
- Review the company field mappings. See Field mappings.
On Validation, review the summary of what syncs, and then select Finish. If something needs fixing, Validation lists the problem and you can't finish until you fix it. See Finishing setup is blocked by a validation problem.
# Step 3: Confirm data is syncing
- In HubSpot, create or update a contact. If you use email as the primary identifier, the contact needs an email address.
- Wait for the next scheduled contact sync. If you left the import option on, existing contacts start syncing right after setup.
- Open the corresponding user profile in Iterable and check for the mapped
fields, such as
contactIdandfirstName. - To check company sync, open the catalog in Iterable (
HubSpotCompaniesby default) and look for an item whose ID matches the HubSpot company ID.
The following sync picks up changes you make in HubSpot within the five minutes before a sync starts.
# Field mappings
The Contact Sync and Company Sync pages each include a field mapping table with default mappings.
- HubSpot Property: Select a source property from the dropdown.
-
Iterable Field: Enter the destination field name on the user profile or
catalog item. Use dots to create nested fields, such as
address.city. - Add a row to restore a property you removed or to send the same property to a second Iterable field.
- Edit Iterable Field to rename a destination field.
- Remove a row to stop syncing that property.
The Customizable column in each default table shows whether you can change the HubSpot property, rename the Iterable field, or remove the row. Yes means you can. No means the field is read-only and always synced. The wizard lists read-only fields above each mapping table.
See Default user profile mappings and Default catalog mappings for the default mappings.
Each mapping table offers a limited set of HubSpot properties. Custom HubSpot
properties aren't available. When a HubSpot property is empty, the integration
leaves the matching Iterable field unchanged. The exception is companyId, which
the integration clears when a contact has no primary company.
# Default user profile mappings
Contacts use the following mappings by default.
With email as the primary identifier, the email address identifies the user, and the integration handles it separately from these mappings.
| HubSpot property | Iterable field | Type | Customizable |
|---|---|---|---|
associatedcompanyid |
companyId* | string | No |
city | city | string | Yes |
country | country | string | Yes |
createdate | createdAt | date | Yes |
email |
email* | string | No |
firstname | firstName | string | Yes |
hs_lead_status |
leadStatus* | string | Yes |
hs_object_id |
contactId* | string | No |
hs_object_id |
userId* | string | No |
hubspot_owner_id |
ownerId* | string | Yes |
jobtitle | jobTitle | string | Yes |
lastmodifieddate | updatedAt | date | Yes |
lastname | lastName | string | Yes |
lifecyclestage |
lifecycleStage* | string | Yes |
phone | phone | string | Yes |
state | state | string | Yes |
Notes:
-
companyId: The primary company's HubSpot ID. The integration clears it when the contact has no primary company. -
contactId: The HubSpot contact ID. -
email: Identifies the user when you use email as the primary identifier. When you use user ID as the primary identifier, the integration also adds it when the contact has an email address. -
leadStatusandlifecycleStage: Contain HubSpot's internal values, such asleadorcustomer, rather than the labels shown in HubSpot. -
ownerId: Contains the HubSpot owner's ID, not their name. -
userId: The integration uses it only when you use user ID as the primary identifier.
# Default catalog mappings
Companies use the following mappings by default. Each company becomes one catalog item, keyed by its HubSpot company ID.
| HubSpot property | Iterable field | Type | Customizable |
|---|---|---|---|
address | address.street | string | Yes |
address2 | address.street2 | string | Yes |
annualrevenue | annualRevenue | double | Yes |
city | address.city | string | Yes |
country | address.country | string | Yes |
createdate | createdAt | date | Yes |
description | description | string | Yes |
domain | domain | string | Yes |
hs_lastmodifieddate |
updatedAt* | date | No |
hs_object_id | Catalog item ID* | string | No |
industry | industry | string | Yes |
lifecyclestage |
lifecycleStage* | string | Yes |
name | name | string | Yes |
numberofemployees | numberOfEmployees | long | Yes |
phone | phone | string | Yes |
state | address.state | string | Yes |
type | companyType | string | Yes |
website | website | string | Yes |
zip | address.postalCode | string | Yes |
Notes:
- Catalog item ID: The HubSpot company ID.
-
lifecycleStage: Contains HubSpot's internal value, such asleadorcustomer, rather than the label shown in HubSpot. -
updatedAt: When the company last changed in HubSpot.
The integration sets a field type in the catalog for each mapped field that
doesn't have one yet. It does this when you finish setup, and fields that
already have a type keep it. If an existing field's type doesn't match the
HubSpot property, for example a numberOfEmployees field already typed as a
string, Iterable may reject values for that field.
# Rotating your HubSpot service key
- In HubSpot, rotate the service key or create a new one, and then copy the new key. A new key needs the scopes listed in HubSpot service key scopes.
- In Iterable, go to Integrations > Integrations Hub and open the HubSpot CRM page.
- Open the connection's menu and select Open Configuration.
- On Connections, replace the HubSpot service key with the new key.
- On Validation, select Finish.
If you turn on automatic rotation for the key in HubSpot, update the connection each time it rotates, before the old key expires.
# Troubleshooting
# Finishing setup is blocked by a validation problem
Validation lists the problem and you can't finish until you fix it. For example:
- Sync Contacts and Sync Companies are both off. Turn on at least one.
- A mapping row has no HubSpot property or Iterable field, or two rows use the same Iterable field.
- A mapping uses an Iterable field that the integration writes itself, such as
contactId, or that Iterable reserves, such asemailoruserId. - The catalog name contains characters other than letters, numbers, and hyphens.
- Sync Companies is on, but Catalog isn't on your plan. Turn off Sync Companies, or talk to your Iterable customer success manager about adding Catalog to your plan.
# A sync stops before it finishes
If HubSpot or Iterable has a temporary error, the sync stops and keeps the progress it made. The next scheduled sync continues from that point.
# Syncing stops after the service key changes
If you rotate or delete the service key in HubSpot, or it expires, syncing stops. Update the connection with the new key to resume. See Rotating your HubSpot service key.