What you need
-
A HubSpot private app token with these scopes:
crm.objects.contacts.readcrm.objects.notes.write
Connect
- In PyAI Console, open Integrations and find HubSpot under CRM.
- Click Connect, paste the token, and pick your events.
- Press Test. A sample note posts to a matched contact (or unassociated if no match exists yet).
- Done. Notes land after every completed call.
How the contact is matched
- If the call carries a
hubspot_contact_idorhubspot_idCRM field, that contact is used directly. - Otherwise PyAI searches your contacts by the caller’s phone number.
- No match → the note posts unassociated with the full summary and call reference.
Troubleshooting
- Error: 401 / INVALID_TOKEN. The token was rotated or deleted. Create a fresh private app token and update the connection (omitted fields preserve stored values).
- Error: 403. The private app is missing a scope. Edit the app in HubSpot and add both scopes, then press Test again.
- Notes land unassociated when you expected a match. Check the contact’s
phone number format in HubSpot; the match searches by the caller’s number,
so international formatting differences matter. Pass
hubspot_contact_idin the call’s CRM fields for an exact match.