HubSpot
Connect HubSpot to your Appstrate agents.
Overview
HubSpot is a CRM and marketing platform. The integration lets agents read and write contacts, companies and deals through the HubSpot API.
Integration: @appstrate/hubspot (version 1.0.4), reached through the api_call tool. For how this works, see How integrations work.
Authentication
| Property | Value |
|---|---|
| Type | oauth2 |
| Credential sent as | Authorization: Bearer <credential> |
| Default scopes | crm.objects.contacts.read |
| Token endpoint auth | client_secret_post |
Scopes
The scopes below are the catalogue the integration declares. An agent gets the default scopes plus any it lists under scopes in its integrations_configuration.
| Scope | Description | Default |
|---|---|---|
crm.objects.contacts.read | Read contacts | yes |
crm.objects.contacts.write | Write contacts | |
crm.objects.companies.read | Read companies | |
crm.objects.companies.write | Write companies | |
crm.objects.deals.read | Read deals | |
crm.objects.deals.write | Write deals | |
content | Content access |
Authorized URIs
The sidecar sends the credential only to URLs that match one of these patterns:
https://api.hubapi.com/**
Connect HubSpot
An administrator registers an OAuth client once, then members connect their own accounts.
Create a public app from a HubSpot developer account (open).
Register the redirect URI as the app's redirect URL: it is APP_URL followed by /api/integrations/callback, also shown in the integration's setup panel.
In Appstrate, open the integration and register the OAuth client (client ID and client secret). See How integrations work.
Use it in an agent
Excerpt of the agent manifest:
{
"dependencies": {
"integrations": { "@appstrate/hubspot": "^1.0.0" }
},
"integrations_configuration": {
"@appstrate/hubspot": {
"tools": ["api_call"],
"scopes": ["crm.objects.deals.read"]
}
}
}api_call has no per-tool scopes, so scopes beyond the defaults are listed explicitly (here crm.objects.deals.read).
Example prompt:
Every morning, list the deals that moved to a new stage yesterday and send the owner a one-line recap.