About the Hubspot category

Put topics about this connector package here.
Always check the ‘How to use the Alumio connector packages’ topic.

Extra information

System documentation: HubSpot APIs | Getting started

Connector package documentation

​​Table of Contents

  • 1. Setting up HTTP Client HubSpot
    • 1.1 Steps
  • 2. Subscribing to entities from HubSpot
    • 2.1 Steps
    • 2.2 General concept
  • 3. Publishing entity to HubSpot
    • 3.1 Steps
    • 3.2 General concept

1. Setting up HTTP Client HubSpot

1.1 Steps

  1. In Alumio Dashboard, go to Clients → HTTP Clients.

  2. Create a new HTTP Client and select HubSpot Client as the prototype of the HTTP Client.

  3. Select the preferred authentication type.

  4. We provide three authentication types you can use to connect to HubSpot.

  5. Please ignore the Grant access to HubSpot button when you select other than Oauth 2.0.

  6. You can optionally enable logging of request to get the log of the authentication.

  7. You can optionally set a base HTTP client to use for the connection by selecting a HTTP client configuration or setting your own HTTP client in the Advanced HTTP client field.

  8. Save the HTTP Client.

2. Subscribing to Entities from HubSpot

2.1 Steps

  1. Go to Connections → Incoming and create a new incoming configuration and select HubSpot Subscriber as the subscriber.
  2. Select the action you want to do.
  3. Add any request parameters needed to subscribe to the entity (optional).
  4. You can optionally add a transformer to transform the request parameters into something you need.
  5. Select the HubSpot HTTP Client to use.
  6. You can also optionally enable pagination to allow Alumio fetches paginated entities. For HubSpot case, you should use Follow next links as pagination type.

2.2 General Concept

We follow HubSpot API documentation on building this connector so you can easily use the connector based on HubSpot API Docs.

Action

It’s the action you want to do (fetching data from HubSpot). Please refer to HubSpot API Docs page.

Request Parameters

It’s the parameters you can provide to get the needed entity based on HubSpot API Docs. Please look at the example below on how to fill Request Parameters field when subscribing CRM Contacts entity.

image

  • Path is the path parameter of the url. For example the {id}.
  • Query is defined set of parameters attached to the end of a url.
    Example: www.url.com?type=true&start=0

It means that we want to subscribe to contact with ID 51 and we want to fetch only email property of the contact. We can see in the documentation that contact entity requires contactId as a path parameter to define which product we want to fetch the images from.

image

That’s why we need to define the contactId property inside path property in the Request Parameters field. The properties inside query parameters (in this example would be properties) will be parsed as query parameters. Here is the final URL that will be called when using such Request Parameters field.

/crm/v3/objects/contacts/51?property=email

Input Transformer

Any transformer’s set here will be executed after the Request Parameters loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need either as path parameters and/or as query parameters of an entity.

HTTP Client

It’s the HTTP Client configuration you will use to access HubSpot.

Follow Pagination

If we want to fetch a list of entities, some systems have pagination to limit the entities returned in one call. HubSpot is one of the systems and it uses the next links included in every list that still has more page(s). By selecting any pagination type in HubSpot subscriber, Alumio will fetch a number of pages according to the number entered in maximum number of pages to fetch field, instead of fetching only one page. Of course, such behavior happens if the next link exists in the previous fetch response. For HubSpot, please set paging.next.link to the Pattern to the link for the next page field. One more step to enable the pagination is by selecting the storage to track the process. You can create a new storage and use it here in the incoming configuration.

3. Publishing Entity to HubSpot

3.1 Steps

  1. Go to Connections → Outgoing, create a new outgoing configuration and select HubSpot – Entity Publisher as the publisher.
  2. Select the action that you want the publisher to do with the data.
  3. Select the HubSpot entity you want the data to be published to.
  4. You can optionally add any query parameters to the request.
  5. You can also optionally add any transformers to transform the data into anything you need before submitting it to HubSpot.
  6. Select the HTTP Client to use.

3.2 General Concept

Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration), though you can also add or modify payload using the Request Transformer.

Method

Currently we support POST, PUT, PATCH and DELETE methods when writing/publishing data to HubSpot.

Action

We support publishing to most HubSpot endpoints. Please refer to HubSpot API Docs page. Based on the documentation, some endpoints may need one or more path parameters.

Please look at the example below. For example, we want to update first and last name of a specific contact. Please select PATCH as the method and CRM - Contacts – Update a contact as the action of the publisher.
image

The documentation describes that we need contactId as path parameters. In that case, you need to provide contactId property into the path property in the data, either as an output from Routes or output from Transformers in the Outgoing Configuration. And you can put the payload you want to send to HubSpot into payload property in the data. Here is an example of the required data.

image

  • Path is the path parameter of the url. For example the {id}.
  • Query is defined set of parameters attached to the end of a url.
    Example: www.url.com?type=true&start=0
  • Payload is the data contained within a request.

Alumio will send an API request to HubSpot with URL /crm/v3/objects/contacts/51 and below request body.
image

HTTP Client

It’s the HTTP Client configuration you will use to access HubSpot.