HubSpot Grid Integration
The HubSpot Grid integration enables Salesforce users to view, search, inline-edit, create, and delete CRM records from HubSpot (Contacts, Companies, Deals, and Tickets) as well as view live Contact email engagement history directly inside AppColab Grid.

What’s Deployed
| Component | Name | Purpose |
|---|---|---|
| Named Credential | HubSpot |
Connects to https://api.hubapi.com via HubSpot External Credential |
| External Credential | HubSpot |
Custom authentication with Bearer <HubSpot_Private_App_Token> |
| Apex Client | HubSpotClient.cls |
REST client supporting listObjects, describeProperties, searchObjects, createObject, updateObject, deleteObject |
| Apex Data Provider | HubSpotGridDataProvider.cls |
Implements appcg.GridDataProviderV1 and appcg.GridDataMutationProviderV1 with full CRUD |
| Permission Set | Integration_Admin |
Grants access to HubSpot → ApiKey external credential principal |
One-Time Manual Setup
1. Create or Obtain a Service Key / Private App in HubSpot
Depending on your HubSpot account view, obtain your token using either method:
-
In HubSpot Developer / App Accounts (Recommended):
- In the left navigation menu, go to Development → Keys → Service Keys.
- Click Create service key (or click an existing key like
ColabConnect). - Under Scopes, ensure the required CRM permissions are enabled:
crm.objects.contacts.read&crm.objects.contacts.writecrm.objects.companies.read&crm.objects.companies.write(optional)sales-email-read(optional, for email engagement history)
- Click Copy next to your Service Key (
pat-...).
-
In Standard HubSpot CRM Portals:
- In your HubSpot portal, click the Settings icon ⚙️ in the top navigation bar.
- In the left sidebar, navigate to Integrations → Private Apps.
- Click Create private app → name it
AppColab Grid. - Under the Scopes tab, select
crm.objects.contacts.readandcrm.objects.contacts.write. - Click Create app (top-right) → confirm and copy the generated token (
pat-...).

2. Configure Credentials in Salesforce Setup
2.1 Create the External Credential
- Go to Setup (gear icon ⚙️ → Setup).
- In the Quick Find box, enter Named Credentials and select Named Credentials.
- Click the External Credentials tab → click New:
- Label:
HubSpot - Name:
HubSpot - Authentication Protocol:
Custom - Click Save.
- Label:
- In the Principals section, click New:
- Parameter Name:
ApiKey - Sequence:
1 - Click Save.
- Parameter Name:
- In the Custom Headers section, click New:
- Name:
Authorization - Value:
Bearer YOUR_HUBSPOT_TOKEN(paste token from Step 1) - Sequence Number:
1 - Click Save.
- Name:

2.2 Create the Named Credential
- Click the Named Credentials tab (next to External Credentials) → click New:
- Label:
HubSpot - Name:
HubSpot - URL:
https://api.hubapi.com - External Credential: Select
HubSpot - Generate Authorization Header: Leave Unchecked (handled by custom Authorization header)
- Allow Formulas in HTTP Header: Checked
- Label:
- Click Save.

3. Assign Permission Set Access
- In Salesforce Setup, enter Permission Sets in Quick Find.
- Select Integration Admin (or
Appcolab Grid Admin). - Click External Credential Principal Access → click Edit.
- Add
HubSpot - ApiKeyto Enabled External Credential Principals. - Click Save and verify the permission set is assigned to your Salesforce users.
Creating a HubSpot Grid Definition
- In Salesforce, open AppColab Grid app → Grid Definitions tab → click New Grid Definition.
- Fill in:
- Grid Settings Name:
HubSpot_Contacts_Grid - Grid Label:
HubSpot Contacts - Is Active?: Checked
- Data Provider Class:
HubSpotGridDataProvider - Data Provider Configuration:
{ "objectType": "contacts" }Tip: You can also use
"companies","deals", or"tickets"as theobjectType.
- Grid Settings Name:
- Click Save & Next → proceed to Preview.
- All HubSpot contacts load live with First Name, Last Name, Email, Phone, Company, Lifecycle Stage, and Lead Status!

Supported Grid Features
| Feature | Details |
|---|---|
| Full CRUD | Inline edit Contact/Deal details, create new contacts, or delete directly from the Grid |
| Server-Side Pagination | Fast, responsive navigation through thousands of HubSpot CRM records |
| Real-Time Search | Leverages HubSpot’s high-speed Search API for instantaneous filtering across names, companies, and emails |
| Parent Record Association | Embed on Salesforce Contact record pages to automatically filter HubSpot records matching the current contact’s email address |
Troubleshooting
401 Unauthorized: Invalid token or expired private app: Ensure your HubSpot Private App is active and the token starts withBearer pat-....403 Forbidden: Missing scopes: Verify that your Private App in HubSpot has both read and write scopes enabled for the chosen CRM object.