Getting Threaded Comments from Notes Programmatically

Hey all,

I am trying to find a way to extract the threaded comments associated with each notes using the available APIs (see attached).

What I’ve tried so far:

  • Finding deals and their associated notes is a straightforward process (use this endpoint):

    https://api.hubapi.com/crm/v3/objects/deals/{deal_id}?associations=notes

  • Extracting text from the notes is feasible (use hs_note_body properties), though in my use-case it returns an HTML output

  • There doesn’t seem to be a straightforward path to extracting threaded comments from eaech notes, even after reviewing the documentation here?

Questions to Community:

  • Is it even possible to extract threaded comments from notes, assuming I already what the note ID is? (the tenative answer seems to be no here, but would like confirmation if that’s the case)
  • [Secondary Question] Is there a way to just return the text from the notes without the associated HTML formatting for hs_body?

Hi @PHoang2,

Currenlty there is no way to get comments via API. If you want to get the note body without the HTML you can use the V1 engagement API which provides the “bodyPreview” property which is a view of the note body without the HTML markup. Alternatively depending on what programming languages you are using there are many libraries that can extract raw text from html strings.

Best,