hubspot_logo.png

HubSpot is a CRM platform with all the software, integrations, and resources you need to connect your marketing, sales, content management, and customer service. HubSpot's connected platform enables you to grow your business faster by focusing on what matters most: your customers.

HubSpot’s CRM platform is made up of six core products for marketing, sales, customer service, content management, operations, and commerce. Each product in the platform is connected to the same underlying CRM database, providing you with incredible insight into every contact at each stage in their customer journey. 

Supported actions

When you integrate Blueshift with HubSpot, you can complete the following actions in HubSpot from within a campaign journey.

For more information, see CRM Contacts in the HubSpot Developer documentation.

Setup overview

Here are the steps involved in setting up integration with Blueshift and creating/updating a contact in HubSpot from a campaign:

  1. Complete the prerequisites.
  2. Configure the HubSpot app in Blueshift to set up integration.
  3. Configure the payload by setting up a template. A separate template is required to create a contact and to update a contact in HubSpot.
  4. Set up a campaign journey and add a HubSpot trigger.
  5. Launch your campaign.

Prerequisites

Before you can set up integration with Blueshift, you must complete the following prerequisites:

  • You must have a HubSpot Business account set up.
  • Each customer that you add in HubSpot as a contact is assigned a Unique Contact ID in HubSpot. If you want to update contact information using this integration, then you must assign the Unique Contact ID from HubSpot to the customer in Blueshift. This hubspot_contact_id is required to update contact information in HubSpot.

Set up integration

To add a HubSpot adapter in Blueshift, complete the following steps:

  1. Sign in to the Blueshift app, and click App Hub in the left navigation menu.
  2. Go to All Apps, search for, and select HubSpot.
  3. You can also go to CRM Apps and select HubSpot.
  4. Click Configure to view all the configured adapters.
  5. Click +ADAPTER to add an adapter.
     

    hubspot_adapter_dec23.png

  6. Add a Name for the adapter.  If you have multiple adapters, the adapter name helps you to identify the integration.
  7. Add the Scopes for HubSpot. Scopes must be separated by a space. By default, the following required scopes are added to the adapter:
    • crm.objects.contacts.read
    • crm.objects.contacts.write
  8. Click Log in to HubSpot and enter your credentials.
     

    hubspot_adapter_signin.png

  9. Select your Business account and click Choose Account.
     

    hubspot_adapter_auth_dec23.png

  10. Save to add the adapter.

    The adapter is now added and you can use it in your Cloud App template. 

Quick start templates

When you create a HubSpot adapter in the App Hub, the following quick start templates are added to the Cloud App templates.

  • Create a Contact in HubSpot
  • Update a Contact in HubSpot

Consider the following points about quick start templates:

  • Quick start templates are identified by the label "QUICK START".
  • A quick start template is added only when you create the first adapter for the app in App Hub. If you have multiple adapters for an app, you can edit the Adapter details on the template Properties tab to select the required adapter.
  • You can use this template as-is in your campaigns. You cannot make any changes to the schema for a quick start template.
  • You can clone the template and then edit the schema as required.

Add a template in Blueshift

You must use a cloud app template to send a payload to HubSpot from a campaign. A separate template is required to create a contact and to update a contact in HubSpot.

You can include personalizations and recommendations in the template content. For more information, see Cloud Apps templates.

  Note

We recommend that you use the quick start template or a clone of the quick start template as these templates are pre-populated with the required values for the API Endpoint, Advanced Settings, and Content Schema. If you opt for creating a HubSpot Cloud App template from scratch, we recommend that you copy the values from these pre-populated fields in the quick start template.

Add a cloud app template to create a contact

To use a quick start template or to add a HubSpot Cloud App template, complete the following steps:

  1. Go to Templates > Cloud App.
  2. Complete one of the following actions:
    • Select the Create a contact in HubSpot quick start template for HubSpot from the list of templates.
    • To create a clone of the quick start template, go to the action menu for the template and click Clone.
    • To create a new template, click +TEMPLATES on the Cloud App Templates page. Select the HubSpot app.

      Note: Only apps that support Cloud Apps templates and have atleast one adapter configured are displayed on the Cloud App Templates page.

  3. Add a name for the cloud app template.
  4. Go to the Properties tab > Settings section.
  5. Select the Adapter that you want to use to send the message.
  6. Add the API endpoint to Create a contact in HubSpot: https://api.hubapi.com/crm/v3/objects/contacts
    The API is added by default to the quick start template.
  7. In the Advanced Settings section, select the HTTP Method as POST. This is selected by default in the quick start template.
  8. Add tags and other relevant information.
     

    hubspot_template_createcontact_properties.png

  9. Go to the Content tab > Schema section.
  10. If you are using a cloned quick start template or a new template, go to the Schema tab and configure the schema for the form. Include the following fields with data type as String:
    • properties
      • firstname
      • lastname
      • website
      • phone
      • company
      • email
  11. Go to the Content Form section and add the values for the fields. You can use Liquid for personalization
     

    hubspot_template_createcontact_content.png

  12. To use attributes from an event in the content instead of user attributes, go to the Data tab > Preview Data section. 
    1. Select Event as the option and then select the event from which you want to use attributes to add to the spreadsheet.
      For example, you can use the sign_up event to add a new contact in HubSpot.
    2. In the Show Data section, go to the bsft_event_context object. This contains the event specific data that you can use in your template.
  13. Save the template.
    You can now use this template in a campaign journey.

Add a cloud app template to update a contact

To use a quick start template or to add a HubSpot Cloud App template, complete the following steps:

  1. Go to Creatives > Cloud App.
  2. Complete one of the following actions:
    • Select the Update a contact in HubSpot quick start template for HubSpot from the list of templates.
    • To create a clone of the quick start template, go to the action menu for the template and click Clone.
    • To create a new template, click +TEMPLATES on the Cloud App Templates page. Select the HubSpot app.

      Note: Only apps that support Cloud Apps templates and have atleast one adapter configured are displayed on the Cloud App Templates page.

  3. Add a name for the cloud app template.
  4. Go to the Properties tab > Settings section.
  5. Select the Adapter that you want to use to send the message.
  6. Add the API endpoint to Update a contact in HubSpot: https://api.hubapi.com/crm/v3/objects/contacts/{{user.extended_attributes.hubspot_contact_id}}
    where hubspot_contact_id is the HubSpot Unique Contact ID assigned in Blueshift to each customer that you have added in HubSpot as a contact.
    The API is added by default to the quick start template.
  7. In the Advanced Settings section, select the HTTP Method as PATCH. This is selected by default in the quick start template.
  8. Add tags and other relevant information.
     

    hubspot_template_updatecontact_properties.png

  9. Go to the Content tab > Schema section.
  10. If you are using a cloned quick start template or a new template, go to the Schema tab and configure the schema for the form. Include the following fields with data type as String:
    • properties
      • firstname
      • lastname
      • website
      • phone
      • company
  11. Go to the Content Form section and add the values for the fields. You can use Liquid for personalization.
     

    hubspot_template_updatecontact_content.png

  12. To use attributes from an event in the content instead of user attributes, go to the Data tab > Preview Data section. 
    1. Select Event as the option and then select the event from which you want to use attributes to add to the spreadsheet.
      For example, you can use the sign_up event to add a new contact in HubSpot.
    2. In the Show Data section, go to the bsft_event_context object. This contains the event specific data that you can use in your template.
  13. Save the template.

Next steps

In your campaign journey, add a HubSpot trigger. Select the template that you created.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.