La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
I have created a report in Hubspot which displays Record ID of custom object and count of notes each record created everyday. Is there any way to get record id and count details through API.
You can add a filter like you did. Once thing to know is that date timestamps are stored as miliseconds, so you'll want to use a filter like {hs_created_by__gt: date}
//today's date at midnight outside of query
const now = Date.now();
const today = new Date(now).setHours(0,0,0,0);
// 1721365200000
query MyQuery {
CRM {
p_on24_collection {
items {
hs_object_id
associations {
note_collection__on24_to_note(filter: {hs_created_by__gt: today} {
total
items
}
}
}
}
}
}
Michelle Tabor • michelle.tabor@lyntonweb.com
Solutions Engineer | Full Stack Developer | HubSpot Architect
Reports are not exposed through the API, only the bare minimum on marketing analytics. 😠
You'll have to compile that info from the CRM information in your code. There's not a nice friendly way to make it happen through regular rest calls that I have found.
I'd do it by using GraphyQL.
Here's a query using one of my own custom objects:
This is what I get back, so it could be parsed to create your own report. Each object in the items array is a custom object record, and the associations.note_collection__on24_to_note.total is the total number of notes on that record.
You can add a filter like you did. Once thing to know is that date timestamps are stored as miliseconds, so you'll want to use a filter like {hs_created_by__gt: date}
//today's date at midnight outside of query
const now = Date.now();
const today = new Date(now).setHours(0,0,0,0);
// 1721365200000
query MyQuery {
CRM {
p_on24_collection {
items {
hs_object_id
associations {
note_collection__on24_to_note(filter: {hs_created_by__gt: today} {
total
items
}
}
}
}
}
}
Michelle Tabor • michelle.tabor@lyntonweb.com
Solutions Engineer | Full Stack Developer | HubSpot Architect