Skip to content

Commit d29e154

Browse files
docs: Hubspot stream labels (#44177)
Co-authored-by: Aldo Gonzalez <[email protected]>
1 parent 70d452b commit d29e154

File tree

1 file changed

+52
-58
lines changed

1 file changed

+52
-58
lines changed

docs/integrations/sources/hubspot.md

+52-58
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,23 @@ This page contains the setup guide and reference information for the [HubSpot](h
1717

1818
## Setup guide
1919

20-
<!-- env:cloud -->
21-
22-
**For Airbyte Cloud:**
23-
24-
We highly recommend you use OAuth rather than Private App authentication, as it significantly simplifies the setup process.
25-
26-
<!-- /env:cloud -->
27-
28-
<!-- env:oss -->
29-
30-
**For Airbyte Open Source:**
31-
32-
We recommend Private App authentication.
33-
34-
<!-- /env:oss -->
35-
36-
More information on HubSpot authentication methods can be found
37-
[here](https://developers.hubspot.com/docs/api/intro-to-auth).
38-
3920
### Step 1: Set up HubSpot
4021

4122
<!-- env:cloud -->
4223

4324
**For Airbyte Cloud:**
4425

45-
**- OAuth** (Recommended)
26+
**- OAuth** (Recommended). We highly recommend you use OAuth rather than Private App authentication, as it significantly simplifies the setup process.
4627

47-
**- Private App:** If you are using a Private App, you will need to use your Access Token to set up the connector. Please refer to the [official HubSpot documentation](https://developers.hubspot.com/docs/api/private-apps) for a detailed guide.
28+
**- Private App:** If you are using a Private App, you will need to use your Access Token to set up the connector. Please refer to the [official HubSpot documentation](https://developers.hubspot.com/docs/api/private-apps) to learn how to obtain the access token.
4829

4930
<!-- /env:cloud -->
5031

5132
<!-- env:oss -->
5233

5334
**For Airbyte Open Source:**
5435

55-
**- Private App setup** (Recommended): If you are authenticating via a Private App, you will need to use your Access Token to set up the connector. Please refer to the [official HubSpot documentation](https://developers.hubspot.com/docs/api/private-apps) for a detailed guide.
36+
**- Private App setup** (Recommended): If you are authenticating via a Private App, you will need to use your Access Token to set up the connector. Please refer to the [official HubSpot documentation](https://developers.hubspot.com/docs/api/private-apps) to learn how to obtain the access token.
5637

5738
**- OAuth setup:** If you are using Oauth to authenticate on Airbyte Open Source, please refer to [Hubspot's detailed walkthrough](https://developers.hubspot.com/docs/api/working-with-oauth). To set up the connector, you will need to acquire your:
5839

@@ -61,11 +42,18 @@ More information on HubSpot authentication methods can be found
6142
- Refresh Token
6243
<!-- /env:oss -->
6344

64-
### Step 2: Configure the scopes for your streams
45+
More information on HubSpot authentication methods can be found
46+
[here](https://developers.hubspot.com/docs/api/intro-to-auth).
47+
48+
### Step 2: Configure the scopes for your streams (Private App only)
49+
50+
These instructions are only relevant if you are using a **Private App** for authentication. You can ignore this if you are authenticating via OAuth.
6551

66-
Unless you are authenticating via OAuth on **Airbyte Cloud**, you must manually configure scopes to ensure Airbyte can sync all available data. To see a breakdown of the specific scopes each stream uses, see our full [Hubspot documentation](https://docs.airbyte.com/integrations/sources/hubspot/).
52+
To set up a Private App, you must manually configure scopes to ensure Airbyte can sync all available data. Each scope relates to a specific stream or streams. Please refer to [Hubspot's page on scopes](https://legacydocs.hubspot.com/docs/methods/oauth2/initiate-oauth-integration#scopes) for instructions.
53+
54+
<details>
55+
<summary>Expand to review scopes</summary>
6756

68-
Next, you need to configure the appropriate scopes for the following streams. Please refer to [Hubspot's page on scopes](https://legacydocs.hubspot.com/docs/methods/oauth2/initiate-oauth-integration#scopes) for instructions.
6957

7058
| Stream | Required Scope |
7159
| :-------------------------- | :----------------------------------------------------------------------------------------------------------- |
@@ -94,6 +82,8 @@ Next, you need to configure the appropriate scopes for the following streams. Pl
9482
| `tickets` | `tickets` |
9583
| `workflows` | `automation` |
9684

85+
</details>
86+
9787
### Step 3: Set up the HubSpot connector in Airbyte
9888

9989
<!-- env:cloud -->
@@ -105,14 +95,19 @@ Next, you need to configure the appropriate scopes for the following streams. Pl
10595
3. On the Set up the source page, select HubSpot from the Source type dropdown.
10696
4. Enter a name for the HubSpot connector.
10797
5. From the **Authentication** dropdown, select your chosen authentication method:
108-
- **Recommended:** To authenticate using OAuth, select **OAuth** and click **Authenticate your HubSpot account** to sign in with HubSpot and authorize your account.
109-
:::tip HubSpot Authentication issues
110-
You might encounter errors during the connection process in the popup window, such as `An invalid scope name was provided`.
111-
To resolve this, close the window and attempt authentication again.
98+
- (Recommended) To authenticate using OAuth, select **OAuth** and click **Authenticate your HubSpot account** to sign in with HubSpot and authorize your account.
99+
100+
:::note HubSpot Authentication issues
101+
You may encounter an error during the authentication process in the popup window with the message `An invalid scope name was provided`. To resolve this, close the window and retry authentication.
112102
:::
113-
- **Not Recommended:**To authenticate using a Private App, select **Private App** and enter the Access Token for your HubSpot account.
114-
6. For **Start date**, use the provided datepicker or enter the date programmatically in the following format:
115-
`yyyy-mm-ddThh:mm:ssZ`. The data added on and after this date will be replicated. If not set, "2006-06-01T00:00:00Z" (Hubspot creation date) will be used as start date. It's recommended to provide relevant to your data start date value to optimize synchronization.
103+
- (Not Recommended) To authenticate using a Private App, select **Private App** and enter the Access Token for your HubSpot account.
104+
105+
<FieldAnchor field="start_date">
106+
107+
6. For **Start date**, use the provided datepicker or enter the date in the following format: `yyyy-mm-ddThh:mm:ssZ`. Data added on and after this date will be replicated. If this is not set, "2006-06-01T00:00:00Z" (the date Hubspot was created) will be used as a start date.
108+
109+
</FieldAnchor>
110+
116111
7. Click **Set up source** and wait for the tests to complete.
117112
<!-- /env:cloud -->
118113

@@ -124,36 +119,20 @@ Next, you need to configure the appropriate scopes for the following streams. Pl
124119
2. From the Airbyte UI, click **Sources**, then click on **+ New Source** and select **HubSpot** from the list of available sources.
125120
3. Enter a **Source name** of your choosing.
126121
4. From the **Authentication** dropdown, select your chosen authentication method:
127-
- **Recommended:** To authenticate using a Private App, select **Private App** and enter the Access Token for your HubSpot account.
128-
- **Not Recommended:**To authenticate using OAuth, select **OAuth** and enter your Client ID, Client Secret, and Refresh Token.
129-
5. For **Start date**, use the provided datepicker or enter the date programmatically in the following format:
122+
- (Recommended) To authenticate using a Private App, select **Private App** and enter the Access Token for your HubSpot account.
123+
- (Not Recommended:) To authenticate using OAuth, select **OAuth** and enter your Client ID, Client Secret, and Refresh Token.
124+
5. For **Start date**, use the provided datepicker or enter the date in the following format:
130125
`yyyy-mm-ddThh:mm:ssZ`. The data added on and after this date will be replicated. If not set, "2006-06-01T00:00:00Z" (Hubspot creation date) will be used as start date. It's recommended to provide relevant to your data start date value to optimize synchronization.
131126
6. Click **Set up source** and wait for the tests to complete.
132127

133128
<FieldAnchor field="enable_experimental_streams">
134129

135130
### Experimental streams
136131

137-
[Web Analytics](https://developers.hubspot.com/docs/api/events/web-analytics) streams may be enabled as an experimental feature but please note that they are based on API which is currently in beta and may change at some point of time or be unstable.
132+
[Web Analytics](https://developers.hubspot.com/docs/api/events/web-analytics) streams may be enabled as an experimental feature. Note that these streams use a Hubspot API that is currently in beta, and they may be modified or unstable as the API continues to develop.
138133

139134
</FieldAnchor>
140135

141-
### Custom CRM Objects
142-
143-
Custom CRM Objects and Custom Web Analytics will appear as streams available for sync, alongside the standard objects listed above.
144-
145-
If you set up your connections before April 15th, 2023 (on Airbyte Cloud) or before 0.8.0 (OSS) then you'll need to do some additional work to sync custom CRM objects.
146-
147-
First you need to give the connector some additional permissions:
148-
149-
<!-- env:cloud -->
150-
151-
- **If you are using OAuth on Airbyte Cloud** go to the Hubspot source settings page in the Airbyte UI and re-authenticate via OAuth to allow Airbyte the permissions to access custom objects.
152-
<!-- /env:cloud -->
153-
- **If you are using OAuth on OSS or Private App auth** go into the Hubspot UI where you created your Private App or OAuth application and add the `crm.objects.custom.read` scope to your app's scopes. See HubSpot's instructions [here](https://developers.hubspot.com/docs/api/working-with-oauth#scopes).
154-
155-
Then, go to the replication settings of your connection and click **refresh source schema** to pull in those new streams for syncing.
156-
157136
<HideInUI>
158137

159138
## Supported sync modes
@@ -223,7 +202,7 @@ The HubSpot source connector supports the following streams:
223202

224203
### Notes on the `property_history` streams
225204

226-
Even though the stream is Incremental, there are some record types that are not affected by the last sync timestamp pointer. For example records of type `CALCULATED` will allways have most recent timestamp equal to the requset time, so whenever you sync there will be a bunch of records in return.
205+
`Property_history` streams can be synced using an `Incremental` sync mode, which uses a cursor timestamp to determine which records have been updated since the previous sync. Within these streams, some fields types (ex. `CALCULATED` type) will always have a cursor timstamp that mirrors the time of the latest sync. This results in each sync including many more records than were necessarily changed since the previous sync.
227206

228207
### Notes on the `engagements` stream
229208

@@ -242,11 +221,25 @@ Even though the stream is Incremental, there are some record types that are not
242221
- Fewer than 10,000 records are being synced
243222
- **EngagementsAll** if either of these criteria are not met.
244223

245-
Because of this, the `engagements` stream can be slow to sync if it hasn't synced within the last 30 days and/or is generating large volumes of new data. We therefore recommend scheduling frequent syncs.
224+
Because of this, the `engagements` stream can be slow to sync if it hasn't synced within the last 30 days and/or is generating large volumes of new data. To accomodate for this limitation, we recommend scheduling more frequent syncs.
246225

247226
### Notes on the `Forms` and `Form Submissions` stream
248227

249-
This stream sync only marketing forms. If you need other forms types try sync `Contacts Form Submissions`.
228+
This stream only syncs marketing forms. If you need other forms types, sync `Contacts Form Submissions`.
229+
230+
### Notes on the `Custom CRM` Objects
231+
232+
Custom CRM Objects and Custom Web Analytics will appear as streams available for sync, alongside the standard objects listed above.
233+
234+
If you set up your connections before April 15th, 2023 (on Airbyte Cloud) or before 0.8.0 (OSS) then you'll need to do some additional work to sync custom CRM objects.
235+
236+
First you need to give the connector some additional permissions:
237+
238+
- **If you are using OAuth on Airbyte Cloud** go to the Hubspot source settings page in the Airbyte UI and re-authenticate via OAuth to allow Airbyte the permissions to access custom objects.
239+
240+
- **If you are using OAuth on OSS or Private App auth** go into the Hubspot UI where you created your Private App or OAuth application and add the `crm.objects.custom.read` scope to your app's scopes. See HubSpot's instructions [here](https://developers.hubspot.com/docs/api/working-with-oauth#scopes).
241+
242+
Then, go to the schema tab of your connection and click **refresh source schema** to pull in those new streams for syncing.
250243

251244
## Limitations & Troubleshooting
252245

@@ -257,7 +250,7 @@ Expand to see details about Hubspot connector limitations and troubleshooting.
257250

258251
### Connector limitations
259252

260-
#### Rate limiting
253+
### Rate limiting
261254

262255
The connector is restricted by normal HubSpot [rate limitations](https://legacydocs.hubspot.com/apps/api_guidelines).
263256

@@ -269,7 +262,6 @@ The connector is restricted by normal HubSpot [rate limitations](https://legacyd
269262

270263
### Troubleshooting
271264

272-
- Consider checking out the following Hubspot tutorial: [Build a single customer view with open-source tools](https://airbyte.com/tutorials/single-customer-view).
273265
- **Enabling streams:** Some streams, such as `workflows`, need to be enabled before they can be read using a connector authenticated using an `API Key`. If reading a stream that is not enabled, a log message returned to the output and the sync operation will only sync the other streams available.
274266

275267
Example of the output message when trying to read `workflows` stream with missing permissions for the `API Key`:
@@ -284,7 +276,9 @@ The connector is restricted by normal HubSpot [rate limitations](https://legacyd
284276
}
285277
```
286278

287-
- **Unnesting top level properties**: Since version 1.5.0, in order to not make the users query their destinations for complicated json fields, we duplicate most of nested data as top level fields.
279+
- **Hubspot object labels** In Hubspot, a label can be applied to a stream that differs from the original API name of the stream. Hubspot's UI shows the label of the stream, whereas Airbyte shows the name of the stream. If you are having issues seeing a particular stream your user should have access to, search for the `name` of the Hubspot object instead.
280+
281+
- **Unnesting top level properties**: Since version 1.5.0, in order to offer users access to nested fields, we also denest the top-level fields into individual fields in the destination. This is most commonly observed in the `properties` field, which is now split into each attribute in the destination.
288282

289283
For instance:
290284

0 commit comments

Comments
 (0)