campaignstack_connect_hubspot
Connect a HubSpot portal by providing a Private App access token (pat-na1-… or pat-eu1-…). Validates the token against the HubSpot CRM API (read ping + write-scope probe) and stores the integration. The private app must have crm.objects.contacts.read and crm.objects.contacts.write scopes; crm.objects.companies.read/write and crm.schemas.contacts.write are optional (company association + source tag). Returns success: true when the token is valid. On failure, errorCode is one of invalid_format, invalid_token, missing_scopes (errorDetail names the scopes), rate_limited, validation, unreachable. Note on missing_scopes: HubSpot reports subscription-tier gating with the same error, naming a scope the portal can never be granted (the Leads object needs Sales Hub Professional/Enterprise). If a scope is ticked in the private app UI but still reported missing, the portal tier is the cause, not the scope set. The token is never echoed back. HubSpot is in beta: it works, but not every path has been verified against a live portal yet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | Yes | ||
| workspaceId | No | Workspace ID (defaults to the bound workspace) |