I am using n8n to make API calls to HubSpot, specifically to automate the creation and association of notes with existing companies.
Setup Details:
- I use HTTP Request nodes in n8n for API calls.
- For authentication, I use the predefined “HubSpot App Token” type in n8n.
- The token has these permissions/scopes:
- crm.objects.contacts.write
- crm.objects.companies.write
- crm.objects.companies.read
- crm.objects.contacts.read
- My goal is to create a note for an existing company.
Attempts and Issues:
1. I tried the HubSpot Notes API (/crm/v3/objects/notes) based on the official documentation. (https://developers.hubspot.com/docs/reference/api/crm/engagements/notes#get-%2Fcrm%2Fv3%2Fobjects%2Fnotes)
- I was able to create notes successfully, but only when associating with a contact object, not with a company.
- Attempts to create a note associated with a company in a single request often return errors that treat the company ID as a contact ID (0-1=…), or “one or more associations are not valid”.
2. I changed to a two-step process:
- Step 1: Create a note without any associations (POST /crm/v3/objects/notes).
- { “properties”: { “hs_note_body”: “Note body”, “hs_timestamp”: “{{Date.now()}}” } }
- Step 2: Associate the note with a company via the v4 Associations API (POST /crm/v4/associations/company/note/batch/create), using associationTypeId 189 (Company → Note) or 190 (Note → Company).
- { “inputs”: [ { “from”: { “id”: “noteId” }, “to”: { “id”: “companyId” }, “typeId”: 190 } ] }
- Although the note creation succeeds, the association fails (the note does not appear on the company, and retrieval endpoints do not show the association).
- (https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4#limitations)
My Questions / Challenges:
- Is my token missing any crucial scopes/permissions needed specifically to create or associate notes with companies? The current scopes cover contacts and companies read/write but do not include any engagement or activities-related scopes.
- Are there additional scopes or roles required for using the Notes API and Associations API fully, especially for company associations?
- Is there a known limitation or different process for associating notes with companies compared to contacts via the API?
- Could issues around associations being interpreted as “contact” rather than “company” be related to permissions or token scopes?
- Are there recommended best practices or example payloads specifically for:
- Creating notes
- Associating notes with companies using n8n’s HTTP Request nodes and the HubSpot App Token authentication?
- Any advice on what scopes or permission adjustments to check or request from the HubSpot admin to enable these operations successfully?