HubSpot API Connection
PocketQuery allows you to connect directly to HubSpot’s REST API and query your CRM data with a wide range of objects, such as Contacts, Companies, Deals, and Discounts. You can use PocketQuery to fetch, filter, and explore this data just like any other data source.
This part just walks you through adding the data source. For the complete tutorial on showing HubSpot contacts in Confluence, check out: HubSpot Contacts [REST Custom]
Step 1: Create a private app in HubSpot
Sign into HubSpot as a Super admin.
In your HubSpot account, navigate to Development.
In the left sidebar menu, navigate to Legacy apps.
In the top right, click Create:

In the dialog box, select Private:

Give the app a name, logo and short description (optional):

Step 2: Choose scopes/permissions
Click the Scopes tab.
At the top of the page, click Add new scope:

In the right panel, select the checkbox for each scope you want your private app to be able to access. For example, wanting to read contacts, you need to add:
crm.objects.contacts.read
If you want Companies / Deals / etc, add:
crm.objects.companies.read,crm.objects.deals.read, ...
After you’ve chosen your scopes, click Create app:

Step 3: Get your access token
After you finish creating it, HubSpot will redirect you to the app overview (Development → Legacy apps → name of your app).
Go to the Auth tab.
Inside the Access Token box, click Show token.
…and then Copy:

Step 4: Create a Datasource in PocketQuery
Open PocketQuery Administration → Datasources, and create a new REST datasource:
Field | Value |
|---|---|
Name |
|
Type |
|
Base URL |
|
Request Headers (left field) |
|
Request Headers (right field) |
(replace “<your-access-token>” with the access token you copied in Step 3) |
You can now test your connection by clicking the Test connection link at the bottom. If everything works as expected, click Create Datasource.
That’s it! Now you can use your Datasource in your Queries.
For the complete tutorial on showing Jira issues and pull requests in Confluence, check out: HubSpot Contacts [REST Custom]