APIs & Integrations

jaysonb
Participant

Retrieve notes associated with contact

SOLVE

I need to retrieve all notes associated with a contact id. I am using Integromat + Custom API Call, easy to experiment with.

 

The hubspot engagement note documentation is hard for me to follow.

 

Where do I put the contact id?

 

https://api.hubapi.com/crm/v3/objects/notes?limit=10&properties=hs_note_body&associations=contact&ar....

0 Upvotes
1 Accepted solution
JBeatty
Solution
Guide | Diamond Partner
Guide | Diamond Partner

Retrieve notes associated with contact

SOLVE

Hi @jaysonb

 

You have two options here:

Option 1:

Get the associated note ids on the contact

https://developers.hubspot.com/docs/api/crm/associations/v3

 

Post /crm/v3/associations/contact/note/batch/read

{"inputs": [{
"id": "457501"
}]}

 

 

Which will return:

 

{ "status": "COMPLETE", "results": [ { "from": { "id": "457501" }, "to": [ { "id": "22570614037", "type": "contact_to_note" }, { "id": "22570614134", "type": "contact_to_note" } ] } ], "startedAt": "2022-06-10T18:00:15.317Z", "completedAt": "2022-06-10T18:00:15.338Z" }

 

 

Then batch get the note properties

https://developers.hubspot.com/docs/api/crm/notes

 

Post /crm/v3/objects/notes/batch/read

{"inputs": [
{"id": "22570614037"},
{"id": "22570614134"}
], "properties":["hs_note_body"]}

 

Which will return the details of the notes.

 

Option 2:

Post the search api

https://developers.hubspot.com/docs/api/crm/search

 

Post /crm/v3/objects/notes/search

{"filters":
[{"propertyName":"associations.contact","operator":"EQ","value":"457501"}],
"properties":["hs_note_body"]}

 

Which will return the details of the notes.

 

It may seem like option 2 is clearly better, but the search api has a seperate 4 per second api limit(seperate from all other requests). While the other two requests share the same 10 or 15(tier depending) api limit of all other requests.

 

Best,

✔️ Was I able to help answer your question? Help the community by marking it as a solution.

Joshua Beatty
Software Developer with Pearagon

Still have questions? Let's Talk

View solution in original post

2 Replies 2
JBeatty
Solution
Guide | Diamond Partner
Guide | Diamond Partner

Retrieve notes associated with contact

SOLVE

Hi @jaysonb

 

You have two options here:

Option 1:

Get the associated note ids on the contact

https://developers.hubspot.com/docs/api/crm/associations/v3

 

Post /crm/v3/associations/contact/note/batch/read

{"inputs": [{
"id": "457501"
}]}

 

 

Which will return:

 

{ "status": "COMPLETE", "results": [ { "from": { "id": "457501" }, "to": [ { "id": "22570614037", "type": "contact_to_note" }, { "id": "22570614134", "type": "contact_to_note" } ] } ], "startedAt": "2022-06-10T18:00:15.317Z", "completedAt": "2022-06-10T18:00:15.338Z" }

 

 

Then batch get the note properties

https://developers.hubspot.com/docs/api/crm/notes

 

Post /crm/v3/objects/notes/batch/read

{"inputs": [
{"id": "22570614037"},
{"id": "22570614134"}
], "properties":["hs_note_body"]}

 

Which will return the details of the notes.

 

Option 2:

Post the search api

https://developers.hubspot.com/docs/api/crm/search

 

Post /crm/v3/objects/notes/search

{"filters":
[{"propertyName":"associations.contact","operator":"EQ","value":"457501"}],
"properties":["hs_note_body"]}

 

Which will return the details of the notes.

 

It may seem like option 2 is clearly better, but the search api has a seperate 4 per second api limit(seperate from all other requests). While the other two requests share the same 10 or 15(tier depending) api limit of all other requests.

 

Best,

✔️ Was I able to help answer your question? Help the community by marking it as a solution.

Joshua Beatty
Software Developer with Pearagon

Still have questions? Let's Talk

jaysonb
Participant

Retrieve notes associated with contact

SOLVE

Dude. Thank You!

 

I didnt see any of this in the documentation 🙂

 

Got your first option at least working in seconds. You put me on the right track!!!

0 Upvotes