Initial setup for HubSpot Writer
This section describes how to configure HubSpot for use with the Striim HubSpot Writer. You must set up authentication credentials and configure the necessary API scopes in HubSpot before using the writer.
Authentication Methods
The HubSpot Writer supports two authentication methods:
OAuth 2.0 Authentication: Token-based authentication suitable for integrations that require delegated access.
Private App Token Authentication: Simplified authentication using a single token, suitable for server-to-server integrations.
Option 1: OAuth 2.0 Authentication Setup
OAuth 2.0 provides secure, token-based authentication for HubSpot integrations.
Create an OAuth App in HubSpot
Sign in to your HubSpot account.
Navigate to Settings > Integrations > Private Apps or Connected Apps.
Click Create app or Create a private app.
Provide a name and description for your app.
In the Scopes tab, select the necessary write permissions for the objects you want to write to. See the Required Scopes section below.
Click Create app.
After creation, note the Client ID and Client Secret.
Generate OAuth Refresh Token
To generate a refresh token for ongoing access:
Use the OAuth 2.0 authorization flow to obtain an authorization code by directing users to HubSpot's authorization URL.
Exchange the authorization code for an access token and refresh token by making a POST request to HubSpot's token endpoint.
Store the refresh token securely. The Striim HubSpot Writer will use this refresh token to automatically obtain and refresh access tokens as needed.
For detailed instructions on OAuth setup in HubSpot, refer to HubSpot's OAuth documentation at https://developers.hubspot.com/docs/api/oauth/overview.
Required OAuth Credentials
You will need the following information for OAuth authentication:
Client ID: The OAuth client identifier from your HubSpot app.
Client Secret: The OAuth client secret from your HubSpot app.
Refresh Token: The OAuth refresh token obtained through the authorization flow.
Option 2: Private App Token Authentication Setup
Private App Token provides simplified authentication using a single token for server-to-server integrations.
Create a Private App in HubSpot
Sign in to your HubSpot account.
Navigate to Settings > Integrations > Private Apps.
Click Create a private app.
Provide a name and description for your app.
In the Scopes tab, select the necessary write permissions for the objects you want to write to. See the Required Scopes section below.
Click Create app.
After creation, click Show token and copy the private app token.
Store the token securely. This token will be used to authenticate all API requests.
Required Scopes
Regardless of which authentication method you choose, you must configure the following scopes in your HubSpot app. The required scopes depend on which objects you plan to write to.
To configure scopes in your HubSpot app:
Select Settings > Integrations > Private Apps.
Select your app.
Open the Scopes tab.
Configure the required scopes, and the optional scopes as needed.
Core Required Scopes
At minimum, configure the following scopes for common CRM objects:
crm.objects.contacts.write- Write access to Contacts.crm.objects.companies.write- Write access to Companies.crm.objects.deals.write- Write access to Deals.crm.objects.owners.write- Write access to Owners.crm.objects.quotes.write- Write access to Quotes.crm.schemas.quotes.write- Write access to Quote schemas.crm.objects.line_items.write- Write access to Line Items.
Optional Scopes
Configure additional scopes as needed for your use case:
crm.objects.goals.writecrm.objects.custom.write- Required for custom objects.crm.objects.leads.writecrm.objects.products.writecrm.objects.orders.writecrm.objects.users.writecrm.pipelines.orders.writemarketing.campaigns.writesettings.users.writesettings.users.teams.writesettings.currencies.writesettings.billing.writecrm.lists.writeAdditional object-specific scopes for appointments, carts, payments, courses, invoices, listings, marketing events, partner objects, services, and subscriptions.
Setting up a connection profile in Striim
A connection profile stores the authentication details required to connect Striim components to HubSpot. By creating a reusable profile, you can avoid re-entering credentials and simplify endpoint configuration across multiple applications.
Create a connection profile for HubSpot Writer
In the Striim web UI, navigate to Manage > Connection Profiles.
Click Add Connection Profile.
Enter a Profile Name that clearly identifies this connection (for example, HubSpotProfile).
Select Endpoint Type as HubSpot.
Select the authentication mode: OAuth or Private App Token.
Provide the required authentication details based on your selected mode:
For OAuth: Client ID, Client Secret, and Refresh Token.
For Private App Token: Private App Token.
Click Save to create the connection profile.
Once saved, this profile can be used when configuring the HubSpot Writer target. In the web UI, enable the Use Connection Profile toggle and select the profile from the dropdown. In TQL, set useConnectionProfile to true and specify the connection profile name.