In modern B2B sales, the “Context Gap” can limit deal effectiveness. Even with comprehensive CRM records—emails, call notes, and deal stages—sales teams often miss critical real-time developments in their prospects’ businesses. If a lead recently raised funding or launched a new product and outreach does not reflect it, it risks being overlooked in a crowded inbox.
Traditionally, closing this gap required manual research: searching online, reviewing news, and checking CRM records. Today, this process can be automated. By integrating OpenAI with the HubSpot CRM SDK and SerpApi, a Sales Assistant can combine internal CRM data with real-time market signals, producing actionable insights and personalized outreach.
The Problem: Static CRMs and the Context Gap
Most CRMs are retrospective—they record historical interactions—but sales are forward-looking. Identifying high-potential leads requires real-time insights:
- Is the company hiring or expanding?
- Are there recent funding rounds or product launches?
- What new market trends might impact their priorities?
Previously, integrating live external signals into a CRM workflow required custom, complex code. While concepts like the Model Context Protocol (MCP) aim to standardize such integrations, our Sales Assistant achieves the same outcomes using direct integrations with HubSpot and SerpApi, without relying on MCP.
How the Sales Assistant Works
The assistant operates in a continuous Plan → Execute → Synthesize loop, combining CRM data with external market intelligence.
1. Plan
When asked, “Prepare a briefing for my meeting with InnovateTech,” the agent evaluates available tools:
- Internal: Query HubSpot for interaction history, primary contacts, and deal stages.
- External: Search the web and news via SerpApi for recent company developments.
2. Execute
The agent retrieves raw data from multiple sources:
- HubSpot SDK: Access company records, contact details, and engagement history.
- SerpApi: Pull recent news articles, funding announcements, and product updates.
3. Synthesize
Using internal and external data, the agent generates personalized recommendations or outreach drafts:
"Congratulations on your recent Series B funding. During our last conversation about cloud migration, you mentioned scaling challenges. With this new investment, we’d like to demonstrate how our solution can help support your upcoming initiatives."
Core Technical Components
Complete implementation is available on GitHub. The Sales Assistant relies on three main components:
1. HubSpot Native SDK
Provides programmatic access to company and contact data, including:
hubspot_search_company_by_domainhubspot_get_contact_by_emailhubspot_get_contact_activity_history
2. SerpApi Web and News Search
Enables structured retrieval of relevant web content and news, with date filtering and normalized results for AI consumption.
3. OpenAI LLM Integration
Coordinates tool calls, synthesizes results, and drafts recommendations or outreach messages
Operational Guidelines
To maintain accuracy and reliability:
- Source Attribution: All external research is linked to original sources.
- Date Normalization: Phrases like “last week” are converted to ISO date ranges before querying.
- Scope Limitation: HubSpot access is read-only for safety.
MCP as an alternative
While the current implementation does not use MCP, it is a promising concept for standardizing AI access to multiple data sources. MCP would allow models to interface with any API or database in a consistent manner. In our case, the agent achieves similar functionality through direct SDK and API integrations with HubSpot and SerpApi.
The alternative implementation would rely on SerpApi MCP and HubSpot MCP.
Conclusion: Observational CRMs
Sales teams are moving from transactional CRMs, where humans manually enter data, to observational CRMs, where AI agents monitor the market and update pipelines proactively.
By integrating HubSpot, SerpApi, and OpenAI, research becomes part of the sales workflow. Sales teams can focus on building relationships with real-time intelligence, improving responsiveness, and reducing context-switching.