Technology Blog Posts by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Swati_Singh
Product and Topic Expert
Product and Topic Expert
468

You can now seamlessly integrate data from diverse sources into the HubSpot platform and elevate your organization’s efficiency by reducing efforts to create a listed set of integration workflows with the HubSpot adapter. 

What is HubSpot? 

HubSpot is a dynamic platform enabling seamless integration across departments such as marketing, sales, and customer service. 

Key Features 

The HubSpot Adapter provides the following key features: 

  • Secure authentication: Secure authentication with OAuth 2.0 and private app access ensures HubSpot securely connects with other applications. Each API request between HubSpot and external platforms is safeguarded. 
  • Support for multiple HubSpot operations: The HubSpot adapter supports various CRUD operations like Create a batch of contacts, Read a deal, Update a company, Delete selected template, etc. 
  • Support for multiple API versions: HubSpot supports multiple API versions with an editable API version field enabling users to input the latest supported version. 
  • Support for XML & JSON: HubSpot Adapter extends support for multiple payload formats. XML and JSON are fully incorporated throughout the adapter. 
  • HubSpot Eclipse plug-in: The Eclipse plug-in helps to generate all necessary up-to-date message XSDs for specific resources and the custom objects in the HubSpot. 
  • Batch Operations in HubSpot: Efficiently manage large datasets with bulk updates, deletions, and creations across contacts and deals, streamlining CRM tasks and enhancing productivity. 
  • Pagination: You can query efficiently with our integrated pagination support. HubSpot adapter supports querying of all records of a resource using Offset & Limit. 
  • Dynamic Configuration Support: The HubSpot adapter allows operations to be executed by selecting options from a dropdown in Basic Configuration or specifying a relative URL in Advanced Configuration. 

How does the HubSpot adapter work? 

The HubSpot adapter is available as part of your SAP Integration Suite license.  

To use the adapter, you must first add it to your Integration Flow, add the required Connection parameters, and configure it as per your Processing requirements. Once you have configured the HubSpot adapter, the SAP CI tenant enables data exchange at runtime by sending a request to the HubSpot receiver system. Finally, after processing this request, HubSpot sends back the required data to SAP. 

Let’s look at a simple operation, Read a batch of Contacts in HubSpot using the HubSpot Adapter.  

Read a batch of Contacts in HubSpot 

Before we begin, it is assumed that contact type records are available in HubSpot for querying. Our example illustrates how the HubSpot Adapter allows querying to read contacts.  

The integration flow begins with a client initiating a request to an endpoint to retrieve contact information from HubSpot.   

_Irfan_Khan_0-1740556611988.png

How to Connect to HubSpot? 

_Irfan_Khan_1-1740556652298.png

Parameter

Description

Address

Specify the recipient’s Endpoint URL.  
 
Example: https://api.hubapi.com 

Authentication 

Select your Authentication Method. 

OAuth2 Credential Alias 

Specify the OAuth2 Credential alias. 

Token Alias 

Specify the Token alias. 

Reuse Connection 

Enable this checkbox if you need to reuse the connection. 

Connection Timeout (in ms) 

Specify the maximum waiting time (in milliseconds) while establishing a connection with HubSpot. 

Response Timeout (in ms) 

Specify the maximum waiting time (in milliseconds) for a response message to be received from HubSpot. 

Preparing Request Body 

We employ a content modifier to ensure that the request payload includes all required parameters for HubSpot querying. The message body must contain the IDs of the contacts you want to retrieve. You can format the message body in either XML or JSON. 

For example, refer to the JSON payload provided in the below figure. 

_Irfan_Khan_2-1740556786935.png

Input Format 

  • XML: Use a content modifier to include all necessary parameters. The XML request body should be properly structured for querying contact data. An XSD generator, available as an Eclipse Plug-in, can help with this. Use the HubSpot Eclipse Plug-in to generate and import XSDs into your Integration Flow. This will allow you to create the correct XML request message. After mapping, the transformed request will be sent to HubSpot. 
  • JSON: No mapping is needed. Directly add the JSON structure with the required information to fetch contact details in the Content Modifier. 

Perform Read a batch of contacts using the HubSpot Adapter   

_Irfan_Khan_3-1740556817698.png

To retrieve contact details, you can choose between two configuration types. For basic configuration, select Basic and specify the API version as v3, category as CRM, entity as Contacts, and the operation as Read a batch of contacts. Additionally, you can specify values in the Properties and Properties With History fields to retrieve responses based on specific properties or track changes in their history. 

Alternatively, for advanced configuration, select Advanced, choose the HTTP method from the dropdown, and provide the Relative URL.  

Note: Ensure that you select the correct request/response payload format from the dropdown menu in the Processing tab. 

 If the output payload is in XML, the response from HubSpot will need additional message mapping to be converted into a format that the client system can understand. XSDs generated by the HubSpot Eclipse Plug-in can assist in creating the necessary mappings for handling the response. 

The client system will receive and process the response to extract the contact information. 

Quick Links   

For a quick start about HubSpot adapter usage, see HubSpot Discovery Mission.   

For detailed information about HubSpot adapter configuration, see HubSpot Receiver Adapter or HubSpot Adapter Guide.  

Note: The HubSpot adapter is available as part of your SAP Integration Suite license.