By Sagar Shankaran, Founder of CallSphere
Build a production integration between an AI voice agent and HubSpot CRM — contact sync, call logging, and deal creation.
Key takeaways
Every voice agent you ship will immediately be asked three questions by the business owner: "did it create the contact?", "did it log the call?", and "did it update the deal?" If the answer to any of those is no, the agent is not useful to their operations team, no matter how good the conversation was.
This guide walks through a production HubSpot integration for an AI voice agent, from the initial contact lookup on ring to the deal stage update at hangup.
ring → lookup contact by phone
│
▼
existing? ── yes ──► attach call to contact
│
no
│
▼
create_contact(name, phone, lifecycle=lead)
│
▼
log_call(contact_id, recording_url, transcript)
│
▼
optionally: create_deal(contact_id, amount, stage)
┌───────────────────┐
│ Voice agent edge │
└─────────┬─────────┘
│ tool call
▼
┌──────────────────────────┐
│ /hubspot service │
│ • OAuth / private app │
│ • retry + idempotency │
│ • webhook consumer │
└──────┬────────────┬──────┘
│ │
▼ ▼
HubSpot API Postgres mirror
from hubspot import HubSpot
from hubspot.crm.contacts import Filter, FilterGroup, PublicObjectSearchRequest
client = HubSpot(access_token=HS_TOKEN)
async def find_contact_by_phone(phone: str):
search = PublicObjectSearchRequest(
filter_groups=[FilterGroup(filters=[
Filter(property_name="phone", operator="EQ", value=phone),
])],
properties=["firstname", "lastname", "lifecyclestage", "email"],
limit=1,
)
resp = client.crm.contacts.search_api.do_search(public_object_search_request=search)
return resp.results[0] if resp.results else None
from hubspot.crm.contacts import SimplePublicObjectInputForCreate
async def create_contact(phone: str, first: str, last: str):
payload = SimplePublicObjectInputForCreate(properties={
"phone": phone,
"firstname": first,
"lastname": last,
"lifecyclestage": "lead",
"hs_lead_status": "NEW",
})
return client.crm.contacts.basic_api.create(simple_public_object_input_for_create=payload)
HubSpot represents a logged call as a Call engagement associated with the contact. Attach the transcript and recording URL.
sequenceDiagram
autonumber
participant Caller as Caller
participant Agent as CallSphere Agent
participant API as CRM API
participant DB as CRM Database
participant Webhook as Webhook Listener
Caller->>Agent: Inbound call begins
Agent->>Agent: STT plus intent detection
Agent->>API: Lookup contact by phone
API->>DB: Read contact record
DB-->>API: Contact and history
API-->>Agent: Personalized context
Agent->>API: Create call activity
Agent->>API: Update deal stage
API->>Webhook: Outbound webhook fires
Webhook-->>Agent: Confirmed
Agent->>Caller: Spoken confirmation
CALL_ENGAGEMENT = {
"properties": {
"hs_timestamp": "2026-04-08T15:00:00Z",
"hs_call_title": "Inbound — AI receptionist",
"hs_call_body": "Caller asked about Saturday availability.",
"hs_call_duration": "185000",
"hs_call_from_number": "+14155551234",
"hs_call_to_number": "+14155550000",
"hs_call_recording_url": "https://storage.yourapp.com/rec/abc.wav",
"hs_call_status": "COMPLETED",
},
"associations": [
{
"to": {"id": "contact_id_here"},
"types": [{"associationCategory": "HUBSPOT_DEFINED", "associationTypeId": 194}],
}
],
}
For sales verticals, create a deal on first call and move it through the pipeline as the conversation progresses.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
async def create_deal(contact_id: str, amount: float, dealname: str):
payload = {
"properties": {
"dealname": dealname,
"amount": str(amount),
"dealstage": "appointmentscheduled",
"pipeline": "default",
},
"associations": [
{"to": {"id": contact_id}, "types": [{"associationCategory": "HUBSPOT_DEFINED", "associationTypeId": 3}]},
],
}
return client.crm.deals.basic_api.create(simple_public_object_input_for_create=payload)
const hubspotTools = [
{ type: "function", name: "log_call", description: "Log an AI call to HubSpot", parameters: { type: "object", properties: { contact_phone: { type: "string" }, summary: { type: "string" }, recording_url: { type: "string" } }, required: ["contact_phone", "summary"] } },
{ type: "function", name: "create_deal", description: "Create a deal for a known contact", parameters: { type: "object", properties: { contact_id: { type: "string" }, dealname: { type: "string" }, amount: { type: "number" } }, required: ["contact_id", "dealname"] } },
];
HubSpot can push deal stage changes back to you. Consume them to keep your local state in sync and trigger follow-up calls.
CallSphere integrates with HubSpot across its sales and real estate verticals. The sales pod uses ElevenLabs TTS with 5 GPT-4 specialists coordinated through the OpenAI Agents SDK, while the real estate stack runs 10 agents including a buyer specialist, seller specialist, rental specialist, and qualification agent. Both push contact creation, call logging, and deal updates into HubSpot through the pattern above, with every write mirrored into per-vertical Postgres for auditing.
The voice layer runs on the OpenAI Realtime API (gpt-4o-realtime-preview-2025-06-03) at 24kHz PCM16 with server VAD, and post-call analytics from a GPT-4o-mini pipeline attach sentiment, intent, and lead score to the HubSpot call engagement as custom properties. CallSphere supports 57+ languages and runs under one second end-to-end on live traffic.
Private App for single-tenant deployments, OAuth for multi-tenant SaaS.
Writes are usually visible within 1-2 seconds, but search indices can lag 30-60 seconds.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
Yes — create a custom property on the Call engagement and set it during create.
Subscribe to the contact.merged webhook and update your mirror table.
Yes — enrolling a contact in a workflow is a single API call.
Want to see an AI voice agent logging calls straight into HubSpot? Book a demo, read the technology page, or see pricing.
#CallSphere #HubSpot #CRM #VoiceAI #Integration #SalesOps #AIVoiceAgents
Written by
Sagar Shankaran· Founder, CallSphere
Sagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
A how-to for Colombian education and tutoring SMBs to answer parents and students instantly, book trial classes 24/7 in Spanish and English, and grow enrollment with a CallSphere AI agent.
Tbilisi professional-services firms serving relocating founders and IT companies use CallSphere AI voice and chat agents to answer enquiries 24/7 in English, Georgian and Russian and book consultations.
A practical how-to for Palau eco-resorts and dive operators on capturing every high-value, multilingual enquiry with a CallSphere AI voice and chat agent, while honouring Palau’s marine-conservation commitments.
How salons, spas and wellness SMBs across the UAE, Saudi Arabia and Qatar use CallSphere AI voice and chat agents to capture every booking 24/7 in Arabic, English and expat languages, and cut no-shows.
How estate agents and property managers in Luxembourg City and across the Grand Duchy use CallSphere to capture multilingual viewing and enquiry calls 24/7, GDPR compliant.
A practical guide for Senegalese logistics, freight, legal and consulting SMBs in Dakar and Thiès to capture every enquiry 24/7 with a CallSphere AI voice and chat agent in French, Wolof and English.
© 2026 CallSphere LLC. All rights reserved.
Made within New York
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI