Skip to main content
Question

How to get logged calls from HubSpot

  • November 25, 2025
  • 2 replies
  • 9 views

Forum|alt.badge.img+1

Hi,

I am trying to create a custom action in Husbpot to pull the content of logged calls. I was able to create a custom action to get contact notes from Hubspot, but I can’t seem to do it for the calls themselves.

 

Just for reference, here is the code to retrieve up to 10 notes associated with a contact in Hubspot. Maybe it’s possible to adjust this code to make it work for the logged calls as well? The AI agent that helps to write this was not able to adjust it, and I tried to change it manually with no luck:

 

// TypeScript function to get up to 10 notes associated with a specific contact and combine them into one long string

export async function getContactNotes({ contactId }: { contactId: string }): Promise<{ result: string }> {

// Step 1: Get the contact with associated note IDs

const contactUrl = `https://api.hubapi.com/crm/v3/objects/contacts/${contactId}?associations=notes`;

// Fetch the contact data with associated notes

const contactResponse = await fetchWithZapier(contactUrl);

await contactResponse.throwErrorIfNotOk();

const contactData = await contactResponse.json();

// Extract note IDs from associations, limiting to 10

const noteIds = contactData.associations?.notes?.results?.slice(0, 10).map((note: any) => note.id) || [];

// If no notes are associated, return an empty string

if (noteIds.length === 0) {

return { result: '' };

}

// Step 2: Batch read up to 10 notes to get their content

const batchUrl = 'https://api.hubapi.com/crm/v3/objects/notes/batch/read';

// Prepare the request to batch read notes

const batchResponse = await fetchWithZapier(batchUrl, {

method: 'POST',

headers: {

'Content-Type': 'application/json',

},

body: JSON.stringify({

inputs: noteIds.map((id: string) => ({ id })),

properties: ['hs_note_body']

})

});

// Ensure the batch request was successful

await batchResponse.throwErrorIfNotOk();

const notesData = await batchResponse.json();

// Combine all note bodies into a single string

const combinedNotes = notesData.results

.map((note: any) => note.properties.hs_note_body)

.join(' ');

 

// Return the combined notes as a single string

return { result: combinedNotes };

}

2 replies

Sparsh from Automation Jinn
Forum|alt.badge.img+6

Hey ​@Maddie Webb,

This is a bit more advanced way and you may need to have some knowledge of code to troubleshoot if custom action can’t give you the action correctly. For starters, I would recommend testing the API requests for logged calls in something like Postman and from there go on to write the custom function.

For this you also have to look into Hubspot API of logged calls and see if there are some nuances that have to be taken into account. Hope it helps!

PS: If you need more active help, I’m happy to connect through my Zapier Solution Partner page if you’d like to reach out here- https://zapier.com/partnerdirectory/automation-jinn


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • November 25, 2025

Hi ​@Maddie Webb 

See screenshot below.

HubSpot API endpoints for Calls: https://developers.hubspot.com/docs/api-reference/crm-calls-v3/guide

 

Zap action: HubSpot - API Request

 

If you need to hire help, there is a directory of Zapier Partners: https://zapier.com/partnerdirectory