HubSpot Cloud Mode (Actions) Destination

Destination Info

Additional versions of this destination are available

This page is about the HubSpot Cloud Mode (Actions) Destination. See below for information about other versions of the HubSpot destination:

HubSpot is an all-in-one marketing tool that helps attract new leads and converts them into paying customers, with features like landing page creation and email automation.

When you use the HubSpot Cloud Mode (Actions) destination, Segment sends your data to HubSpot’s REST API.

The Upsert Company action is not compatible with the Segment Event Tester. As a result, Segment recommends using other tools to test and troubleshoot the creation and updates of companies in HubSpot.

Benefits of HubSpot Cloud Mode (Actions) vs HubSpot Classic

HubSpot Cloud Mode (Actions) provides the following benefits over the classic HubSpot destination:

  • Fewer settings. Data mapping for actions-based destinations happens during configuration, which eliminates the need for most settings.
  • Clearer mapping of data. Actions-based destinations enable you to define the mapping between the data Segment receives from your source, and the data Segment sends to the destination.
  • Granular control over data sent. You can customize the conditions under which the events are sent to HubSpot.
  • OAuth 2.0 support. Authentication with HubSpot uses OAuth 2.0 instead of an API key.
  • Sandbox support. Test with a HubSpot sandbox account before implementing in your main production account to feel confident in your configuration.
  • Support for custom behavioral events. Send custom behavioral events and event properties to HubSpot.
  • Create records in custom objects. Use your Segment events to create records in any standard or custom object in your HubSpot account.

Getting started

  1. From the Segment web app, navigate to Connections > Catalog.
  2. Search for HubSpot Cloud Mode (Actions) in the Destinations Catalog, and select the destination.
  3. Click Configure HubSpot Cloud Mode (Actions).
  4. Select the source that will send data to HubSpot Cloud Mode (Actions) and follow the steps to name your destination.
  5. On the Settings tab, authenticate with HubSpot using OAuth. Your user must be a super admin in the HubSpot account to authenticate the connection.
  6. Follow the steps in the Destinations Actions documentation on Customizing mappings.
  7. Enable the destination and configured mappings.

To ensure that data is sent downstream, configure and enable at least one mapping to handle a connected sources event(s).

No settings available. The destination may not be publicly visble.

Available Actions

Build your own Mappings! Combine supported triggers with the following HubSpot Cloud Mode-supported actions:

Mapping limits per destination

Individual destination instances have support a maximum of 50 mappings.

Send Custom Behavioral Event

Send a custom behavioral event to HubSpot.

Send Custom Behavioral Event is a Cloud action. The default Trigger is: type = "track"

Click to show / hide fields

Field Description
Event Name* Type: STRING

The internal event name assigned by HubSpot. This can be found in your HubSpot account. Events must be predefined in HubSpot. Please input the full internal event name including the pe prefix (i.e. pe<HubID>_event_name). Learn how to find the internal name in HubSpot’s documentation.

Event Timestamp Type: DATETIME

The time when this event occurred. If this isn’t set, the current time will be used.

Email Address Type: STRING

The email of the contact associated with this event. This is required if no user token or object ID is provided.

User Token Type: STRING

The user token (utk) of the contact associated with this event. This is required if no email or object ID is provided.

Object ID Type: STRING

The ID of the object associated with this event. This can be the HubSpot contact ID, company ID, or ID of any other object. This is required if no email or user token is provided.

Event Properties Type: OBJECT

Default or custom properties that describe the event. On the left-hand side, input the internal name of the property as seen in your HubSpot account. On the right-hand side, map the Segment field that contains the value. See more information in HubSpot’s documentation.

Upsert Company

Create or update a company in HubSpot.

Upsert Company is a Cloud action. The default Trigger is: type = "group"

Click to show / hide fields

Field Description
Unique Company Identifier* Type: STRING

A unique identifier you assign to a company. Segment creates a custom property in HubSpot to store this value for each company so it can be used as a unique search field. Segment recommends not changing this value once set to avoid creating duplicate companies.

Create Company if Not Found* Type: BOOLEAN

If true, Segment will attempt to update an existing company in HubSpot and if no company is found, Segment will create a new company. If false, Segment will only attempt to update an existing company and never create a new company. This is set to true by default.

Associate Contact with Company* Type: BOOLEAN

If true, Segment will associate the company with the user identified in your payload. If no contact is found in HubSpot, an error is thrown and the company is not created/updated. If false, Segment will not attempt to associate a contact with the company and companies can be created/updated without requiring a contact association. This is set to true by default.

Company Search Fields Type: OBJECT

The unique field(s) used to search for an existing company in HubSpot to update. By default, Segment creates a custom property to store groupId for each company and uses this property to search for companies. If a company is not found, the fields provided here are then used to search. If a company is still not found, a new one is created.

Company Name Type: STRING

The name of the company.

Company Description Type: STRING

A short statement about the company’s mission and goals.

Street Address Type: STRING

The street address of the company.

City Type: STRING

The city where the company is located.

State Type: STRING

The state or region where the company is located.

Postal Code Type: STRING

The postal or zip code of the company.

Domain Type: STRING

The company’s website domain.

Phone Type: STRING

The company’s primary phone number.

Number of Employees Type: INTEGER

The total number of people who work for the company.

Industry Type: STRING

The type of business the company performs.

Lifecycle Stage Type: STRING

The company’s stage within the marketing/sales process. See more information on default and custom stages in HubSpot’s documentation. Segment supports moving status forwards or backwards.

Other Properties Type: OBJECT

Any other default or custom company properties. On the left-hand side, input the internal name of the property as seen in your HubSpot account. On the right-hand side, map the Segment field that contains the value. Custom properties must be predefined in HubSpot. See more information in HubSpot’s documentation. Important: Do not use ’segment_group_id’ here as it is an internal property and will result in an an error.

Create Custom Object Record

Create records of Deals, Tickets or other Custom Objects in HubSpot.

Create Custom Object Record is a Cloud action.

Click to show / hide fields

Field Description
Object Type* Type: STRING

The CRM object schema to use for creating a record. This can be a standard object (i.e. tickets, deals) or fullyQualifiedName of a custom object. Schema for the Custom Objects must be predefined in HubSpot. More information on Custom Objects and fullyQualifiedName in HubSpot documentation.

Properties* Type: OBJECT

Properties to send to HubSpot. On the left-hand side, input the internal name of the property as seen in your HubSpot account. On the right-hand side, map the Segment field that contains the value. Please make sure to include the object’s required properties. Any custom properties must be predefined in HubSpot. More information in HubSpot documentation.

Upsert Contact

Create or update a contact in HubSpot.

Upsert Contact is a Cloud action. The default Trigger is: type = "identify"

Click to show / hide fields

Field Description
Email* Type: STRING

The contact’s email. Email is used to uniquely identify contact records in HubSpot. If an existing contact is found with this email, we will update the contact. If a contact is not found, we will create a new contact.

Company Name Type: STRING

The contact’s company.

First Name Type: STRING

The contact’s first name.

Last Name Type: STRING

The contact’s last name.

Phone Type: STRING

The contact’s phone number.

Street Address Type: STRING

The contact’s street address, including apartment or unit number.

City Type: STRING

The contact’s city of residence.

State Type: STRING

The contact’s state of residence.

Country Type: STRING

The contact’s country of residence.

Postal Code Type: STRING

The contact’s zip code.

Website Type: STRING

The contact’s company/other website.

Lifecycle Stage Type: STRING

The contact’s stage within the marketing/sales process. See more information on default and custom stages in HubSpot’s documentation. Segment supports moving status forwards or backwards.

Other properties Type: OBJECT

Any other default or custom contact properties. On the left-hand side, input the internal name of the property as seen in your HubSpot account. On the right-hand side, map the Segment field that contains the value. Custom properties must be predefined in HubSpot. See more information in HubSpot’s documentation.

FAQ & Troubleshooting

How do I send other standard objects to HubSpot?

Segment provides prebuilt mappings for contacts and companies. If there are other standard objects you would like to create records in, please use the Create Custom Object Record action. For example, to create a deal in HubSpot, add a mapping for Create Custom Object Record, set up your Event Trigger criteria, and input a literal string of “deals” as the Object Type. You can use the Properties object to add fields that are in the deals object, such as dealname and dealstage. The same can be done with other object types (for example, tickets, quotes, etc). Ending fields that are to go to HubSpot outside of the properties object isn’t supported. This includes sending associations. Please note, Segment only supports creating new records in these cases; updates to existing records are only supported for contacts and companies.

How do I send Page events to HubSpot?

The Track Page View action is only available in HubSpot Web (Actions) destination. As a workaround, with HubSpot Cloud Mode (Actions) destination, you can use the Custom Behavioral Event to send Page events to Hubspot. You’ll need to follow Hubspot’s instructions to create a custom behavioral event for Page Viewed in HubSpot.

Why aren’t my custom behavioral events appearing in HubSpot?

HubSpot has several limits for custom behavioral events, including a limit on the number of event properties per event. Each event can contain data for up to 50 properties. If this limit is exceeded, the request will fail. See HubSpot documentation for other limits.

A HubSpot Enterprise Marketing Hub account is required to send Custom Behavioral Events.

Does the HubSpot Cloud Mode (Actions) destination support EU data residency?

Yes. HubSpot will automatically redirect API requests directly to an EU data center if your HubSpot instance is on an EU data center. See more in HubSpot’s Routing API Traffic article.

This page was last modified: 25 Apr 2023



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account