Hubspot Connector
Documentation
Version: 5
Documentation

Hubspot Connector Examples


The ZappySys API Driver is a user-friendly interface designed to facilitate the seamless integration of various applications with the Hubspot API. With its intuitive design and robust functionality, the ZappySys API Driver simplifies the process of configuring specific API endpoints to efficiently read or write data from Hubspot.

On this page you will find some SQL examples which can be used for API ODBC Driver or Data Gateway API Connector.

Get companies    [Read more...]

Gets companies

SELECT * FROM Companies --Where Id=123

Get contacts    [Read more...]

Gets contacts

SELECT * FROM Contacts --Where Id=123

Get contact by Id    [Read more...]

Gets contact by Id

SELECT * FROM Contacts Where Id=51

Get contact by email (search)    [Read more...]

Gets contacts

SELECT Id
	, IsArchived
	, CreatedAt
	, UpdatedAt
	, email
	, firstname
	, lastname
	, company_size
	--, custom_checkbox
	--, custom_multi_select
	--, custom_number
	--, custom_pickuser
	--, custom_richtext
	--, custom_string
	--, custom_string_multi
FROM search_contacts
With(SearchFilters='[ {"propertyName": "email", "operator": "EQ", "value": "bh@hubspot.com" } ]')

Get deals    [Read more...]

Gets deals

SELECT * FROM Deals --Where Id=123

Get line items    [Read more...]

Gets line items

SELECT * FROM LineItems --Where Id=123

Get owners    [Read more...]

Gets owners

SELECT * FROM Owners

Get products    [Read more...]

Gets products

SELECT * FROM Products --Where Id=123

Get tickets    [Read more...]

Gets tickets

SELECT * FROM Tickets

Get quotes    [Read more...]

Gets quotes

SELECT * FROM Quotes

Generic Request (Company Search API Example)    [Read more...]

This example shows how to invoke generic request when connector file doesnt have specific EndPoint / Table you like to query. This example invokes search endpoint but you can call any valid API endpoint GET/POST etc with this method

SELECT *
FROM generic_request
WITH(
     Url='crm/v3/objects/companies/search'
    ,Filter='$.results[*]'
    ,RequestContentTypeCode='ApplicationJson'
    ,RequestMethod='POST'
    ,RequestData='{
        "filters": [ {"propertyName": "hs_lastmodifieddate", "operator": "GT", "value": "<<yearstart-1y||unix_timestamp_ms,FUN_TO_DATE>>" } ],
        "properties": ["address","city","state"]  
        }'
)

Upload File (Generic Request Example)    [Read more...]

This example shows how to upload a file using generic request. You might have to add file-manager-permission to your OAuth App else you might get message=This oauth-token (CJT87I6) does not have proper permissions! (requires any of [file-manager-access]). For more information please refer to this link https://developers.hubspot.com/docs/api/files/files

SELECT *
FROM generic_request
WITH(
	  Url='filemanager/api/v3/files/upload'
	, RequestMethod='POST'
	, Filter ='$.objects[*]'
	, Body='file=@c:\temp\dump.png
folderPath=/
fileName=my_dump.png
options={"access": "PRIVATE", "overwrite": true}'
	, IsMultiPart='True'
	, Meta='id:long; name:string; title:string; url: string; type:string; size:long; friendly_url:string; meta.allows_anonymous_access:string; meta.indexable:bool'
)

Insert into Contacts    [Read more...]

Inserts contacts

INSERT INTO Contacts(email, firstname, lastname,custom_checkbox, custom_date, custom_number)
VALUES ('john.doe@abc.com', 'John', 'Doe','true','2023-01-01', 100.55)

Update Contacts    [Read more...]

Updates contacts in your account

UPDATE Contacts
SET firstname = 'Brian'
   ,lastname = 'Halligan (Sample Contact)'
   --,custom_number=12.12
   --,custom_date='2023-01-01'
   --,custom_string='My Test<<FUN_NOW>>'
   --,custom_richtext='<p><span style="color: #b5b5b5;">##-Please reply-##</span></p>'
   --,custom_multi_select='Blue;Yellow;Black'
   --,custom_pickuser=45581955
   --,custom_dropdown='BB'
   --,custom_checkbox='true'   
WHERE Id = 51

Delete a contact    [Read more...]

Deletes a contact

DELETE FROM Contacts Where Id=1234

Create multiple records - (BULK read / write from external source)    [Read more...]

This examples shows how to perform bulk update using SOURCE clause. It reads data from external system (in this example MS SQL Server) and sends data to Hubspot using Bulk API

INSERT INTO Contacts 
SOURCE(
  'MSSQL' --ODBC or OLEDB
  ,'Data Source=localhost;Initial Catalog=Test;Integrated Security=true'
  ,' 
    ''bob'' as firstname, ''rock'' as firstname, ''new-email1@abc.com'' as email
    UNION 
    ''sam'' as firstname, ''smith'' as firstname, ''new-email2@abc.com'' as email
)

Delete multiple records - (BULK read / write from external source)    [Read more...]

This examples shows how to perform bulk delete using SOURCE clause. It reads data from external system (in this example MS SQL Server) and sends data to Hubspot using Bulk API

DELETE FROM Contacts 
SOURCE(
  'MSSQL' --ODBC or OLEDB
  ,'Data Source=localhost;Initial Catalog=Test;Integrated Security=true'
  ,'select 104897 as Id 
    UNION 
    select 104898 as Id'
)

Update multiple records - (BULK read / write from external source)    [Read more...]

This examples shows how to perform bulk update using SOURCE clause. It reads data from external system (in this example MS SQL Server) and sends data to Hubspot using Bulk API

UPDATE Contacts 
SOURCE(
  'MSSQL' --ODBC or OLEDB
  ,'Data Source=localhost;Initial Catalog=Test;Integrated Security=true'
  ,'select 104811 as Id, ''new-email1@abc.com'' as email
    UNION 
    select 104812 as Id, ''new-email2@abc.com'' as email
)

Getting Started with Examples

ZappySys API Driver is a powerful software solution designed to facilitate the extraction and integration of data from a wide range of sources through APIs. Its intuitive design and extensive feature set make it an essential asset for any organization dealing with complex data integration tasks.

To get started with examples using ZappySys API Driver, please click on the following applications:

SQL Server Connect Hubspot in SQL Server
Power BI Connect Hubspot in Power BI
SSRS Connect Hubspot in SSRS
Informatica Connect Hubspot in Informatica
MS Access Connect Hubspot in MS Access
MS Excel Connect Hubspot in MS Excel
SSAS Connect Hubspot in SSAS
C# Connect Hubspot in C#
Python Connect Hubspot in Python
JAVA Connect Hubspot in JAVA
Tableau Connect Hubspot in Tableau
SAP Crystal Reports Connect Hubspot in SAP Crystal Reports
Azure Data Factory (Pipeline) Connect Hubspot in Azure Data Factory (Pipeline)
Talend Studio Connect Hubspot in Talend Studio
UiPath Connect Hubspot in UiPath
PowerShell Connect Hubspot in PowerShell
ODBC Connect Hubspot in ODBC

Key features of the ZappySys API Driver include:

The API ODBC driver facilitates the reading and writing of data from numerous popular online services (refer to the complete list here) using familiar SQL language without learning complexity of REST API calls. The driver allows querying nested structure and output as a flat table. You can also create your own ODBC / Data Gateway API connector file and use it with this driver.

  1. Intuitive Configuration: The interface is designed to be user-friendly, enabling users to easily set up the specific API endpoints within Hubspot without requiring extensive technical expertise or programming knowledge.

  2. Customizable Endpoint Setup: Users can conveniently configure the API endpoint settings, including the HTTP request method, endpoint URL, and any necessary parameters, to precisely target the desired data within Hubspot.

  3. Data Manipulation Capabilities: The ZappySys API Driver allows for seamless data retrieval and writing, enabling users to fetch data from Hubspot and perform various data manipulation operations as needed, all through an intuitive and straightforward interface.

  4. Secure Authentication Integration: The driver provides secure authentication integration, allowing users to securely connect to the Hubspot API by inputting the necessary authentication credentials, such as API tokens or other authentication keys.

  5. Error Handling Support: The interface is equipped with comprehensive error handling support, ensuring that any errors or exceptions encountered during the data retrieval or writing process are efficiently managed and appropriately communicated to users for prompt resolution.

  6. Data Visualization and Reporting: The ZappySys API Driver facilitates the seamless processing and presentation of the retrieved data from Hubspot, enabling users to generate comprehensive reports and visualizations for further analysis and decision-making purposes.

Overall, the ZappySys API Driver serves as a powerful tool for streamlining the integration of applications with Hubspot, providing users with a convenient and efficient way to access and manage data, all through a user-friendly and intuitive interface.