Deduplicate Notes on Custom Objects

We recently used a third-party tool to deduplicate custom objects. In doing so, many of the merged objects had the same notes, which were imported natively in HubSpot and now display 2-3x on the merged record. Is there a way to merge or deduplicate notes in HubSpot, or any tools to properly execute this action?

Hi @AFangman it sounds like the third-party tool didn’t look at the associations for the notes to identify that there was overlap and instead treated each record’s notes as unique - thereby resulting in duplicate notes across your records. Now that the association is lost (the notes are all associated to the same record instead of separate records), there’s no way for HubSpot or any third-party tool to recognize that those notes are duplicates - outside of looking at the date/time stamp for notes on the same record, and I don’t think there is a third-party tool that would do this for you given how specific the use case is.

My suggestion would be to use the Notes API - in looking at the endpoints, the Archive (delete) option for notes only works by note ID, so you’d need to first get a list of notes that have duplicate values for the date/time stamp (if that’s accessible as a property), then return that list and delete the duplicates. This would return the full list, so if a record has 3 duplicates, all 3 duplicate note IDs would show on the list and your code would have to include criteria to skip the first and only delete subsequent, which might prove to be a bit more complex.

I haven’t validated this solution is possible via the API, this is where I would start with our devs if we had a similar request.