About HubSpot connector
Etlworks HubSpot connector allows fast, real-time access to HubSpot data. The connector supports most of the objects available through the HubSpot API and works just like any other database connector.
Etlworks partnered with CData to provide access to the HubSpot API using industry-standard JDBC protocol. Read about CData HubSpot JDBC connector.
When to use HubSpot connector
Use this connector to create flows that work with data in HubSpot.
Enable HubSpot connector for your Etlworks account. Contact email@example.com to enable connector.
Creating a HubSpot app
To access HubSpot from Etlworks, you must create a HubSpot app using a HubStop developer account.
- Log into your HubSpot developer account. If you don't have one, go to https://developers.hubspot.com/ and click "Create a developer account".
- Click Manage Apps.
- Click Create App.
- Click the Auth tab.
- Make note of or copy the Client ID and Client Secret.
- Enter localhost:33333 in the Redirect URL field.
- Add scopes you would like to have access to.
- Click Save.
Creating a connection
Step 1. In the Connections window click the
+ button and type in hubspot.
Step 2. Select HubSpot and enter the following parameters
- OAuth Client ID - the Client ID of the HubSpot app.
- OAuth Client Secret - the Client Secret of the HubSpot app.
Step 3. Obtain the Authorization code.
1. Go to HubSpot app.
2. Select Auth tab.
3. Click Copy Full URL,
4. Open the web browser and paste the URL. Click enter.
5. Select the actual HubSpot account, not the Developer account.
6. Authorize HubSpot app to access your HubSpot data.
7. Copy the code from the redirect URL.
Step 4. Paste the authorization code into OAuth Authorization Code field.
The authorization code is active for a short period of time (a few minutes). If it will expire before you were able to use it, you will need to repeat steps 3-7, starting from "Copy full URL".
Step 5. Test and save the connection.
Use Other parameters to specify the connection string options. Read about available connection string options.
HubSpot data model
Our connector models HubSpot entities as relational Tables, Views, and Stored Procedures.
Read about the HubSpot data model.
Stored procedures are available to complement the data available from the Data Model. It may be necessary to update data available from a view using a stored procedure because the data does not provide for direct, table-like, two-way updates. In these situations, the retrieval of the data is done using the appropriate view or table, while the update is done by calling a stored procedure. Stored procedures take a list of parameters and return back a dataset that contains the collection of tuples that constitute the response.
Read about available stored procedures.
To call stored procure from the SQL flow or from Before/After SQL, use EXEC sp_name params=value syntax. Example:
EXEC GetOAuthAccessToken scope = 'events-rw settings-rw contacts-rw offline'
Working with data in Hubspot
Extracting data from HubSpot
Extracting data from HubSpot is similar to extracting data from the relational database.
Step 1. Create a HubSpot connection which will be used as a source (FROM).
Step 3. Create a flow where the source is a database and the destination is a connection created in step 2, for example a relational database.
Step 4. Add a new source-to-destination transformation.
Step 5. Select HubSpot connection created in step 1 as a source connection and select the HubSpot object you are extracting data from:
Step 6. Select TO connection, format (if needed) and object (for example database table) to load data into.
Step 7. Click MAPPING and optionally enter Source Query (you don't need a query if you are extracting data from the HubSpot object unconditionally).
Step 8. Optionally define the per-field mapping.
Step 9. Add more transformations if needed.
Loading data in HubSpot
Loading data in HubSpot is similar to loading data into a relational database.
Step 1. Create a source connection and a format (if needed).
Step 2. Create destination HubSpot connection.
Step 3. Create a flow where the destination is a database.
Step 4. Add new source-to-destination transformation.
Step 5. Select FROM and TO connections and objects (also a FROM format if needed).
Step 6. Optionally define the per-field mapping.
Step 7. Add more transformations if needed.
Browsing data in HubSpot
You must have a HubSpot connection to browse objects and run SQL queries.
Use Explorer to browse data and metadata in HubSpot as well as execute DML and SELECT queries against HubSpot connection.