HubSpot Integration — Disconnect
How to disconnect
- Go to Settings → Integrations → HubSpot.
- Click Disconnect.
- Confirm the action when prompted.
You need the tenant:integrations:hubspot:disconnect permission, which is granted to tenant owners and admins.
You can also disconnect via MCP: disconnect_hubspot(confirm="yes").
What happens when you disconnect
Immediate effects
- The OAuth refresh token is deleted. FlowState can no longer call HubSpot APIs on behalf of your portal.
- The integration is marked
status = disconnectedin FlowState. - The pipeline refresh cron stops issuing HubSpot requests for your tenant.
- Webhook events from HubSpot are still received by FlowState’s shared webhook endpoint (HubSpot sends them until you also uninstall the FlowState app in HubSpot), but they are dropped after the portal-to-tenant lookup confirms the integration is disconnected.
- APN sync is paused: no new outbound write messages are enqueued. In-flight messages already in the SQS queue complete their current attempt and then stop retrying.
What is preserved
- APN sync state — your sync state is tracked per deal and is preserved. If you reconnect later, the sync engine resumes from the last known state without re-creating APN opportunities.
- The 10 custom properties in HubSpot — the
flowstate_apnproperty group and all property definitions remain in your HubSpot portal. The current values on deal records are preserved. You can continue to view them in HubSpot. - Pipeline snapshots and AI summaries — these expire on their normal TTL schedule (pipeline snapshots: 1 day; deal AI summaries: 8 days). They are not immediately purged.
- Billing records — deal-count metering rows are preserved for the billing period.
What is not preserved
- The OAuth tokens. If you reconnect, you authorize a fresh OAuth grant — the new token is independent of the previous one.
How to reconnect
Go to Settings → Integrations → HubSpot and click Connect HubSpot to follow the OAuth connection flow. This only re-authorizes and stores fresh tokens — it does not re-run the property provisioner automatically (provisioning was never automatic in the first place; see Getting started). If you previously ran Provision properties, the properties are still in HubSpot from before and need no action; if you never ran it, click Provision properties again after reconnecting. Either way it is idempotent — it never duplicates or overwrites existing properties or values.
After reconnecting, the pipeline refresh cron resumes automatically on the next scheduled run. APN sync for deals with apn_sync_with_aws_enabled = true resumes when the next webhook event or polling cycle fires.
Disconnecting from HubSpot’s side
If a HubSpot Super Admin uninstalls the FlowState app from HubSpot (Settings → Integrations → Connected apps → FlowState → Uninstall), the effect is equivalent to token revocation. FlowState only notices this reactively, on the next token refresh attempt: the refresh call fails and the failure is logged. The integration’s stored status is not changed and no email is sent — it still shows connected in FlowState until a HubSpot call surfaces the failure (for example, the pipeline fetch or the test_hubspot MCP tool) or you disconnect it yourself. See Permissions & scopes for the underlying behavior.
To clean up the FlowState integration completely from HubSpot’s side:
- Uninstall the FlowState app in HubSpot (revokes the OAuth grant).
- Optionally delete the
flowstate_apnproperty group: Settings → Properties → Filter by group → flowstate_apn → Delete group. This removes all 10 custom properties and their current values from all deal records. This action cannot be undone.
Deleting the property group does not affect the APN sync state FlowState keeps for your deals.