IntegrationsIntegration setup guides

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

PropertyValue
Typeoauth2
Credential sent asAuthorization: Bearer <credential>
Default scopescrm.objects.contacts.read
Token endpoint authclient_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.

ScopeDescriptionDefault
crm.objects.contacts.readRead contactsyes
crm.objects.contacts.writeWrite contacts
crm.objects.companies.readRead companies
crm.objects.companies.writeWrite companies
crm.objects.deals.readRead deals
crm.objects.deals.writeWrite deals
contentContent 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.

On this page