• 296KRecords processed
  • 86Pipeline runs
  • 37K+Contacts pushed to HubSpot
  • 9Database tables
01

The problem

Every event brings a list of exhibiting companies. Finding the right contacts at each one by hand is slow, and buying data blindly burns credits on the wrong people.

The output also had to land cleanly in HubSpot: no duplicate companies, contacts associated with the right company, and nothing pushed without a person checking it.

02

What I built

  • Flexible intake

    Events and exhibitors from a HubSpot custom object, or from CSV, XLSX or pasted lists.

  • Model-driven search

    The OpenAI Responses API drives a licensed B2B data provider's company and people search through MCP, with hard credit rules in the prompt.

  • Ranking and filters

    Local ranking with strictness levels: dynamic, no-filter and progressive retry when a strict search comes back empty.

  • Email finding

    Parallel requests with track IDs, async webhooks and rate-limit backoff.

  • Approval and push

    Manual approval, then HubSpot upsert of the company by domain, the contact, and their association, through a push queue.

  • Operations layer

    Resumable bulk jobs, diagnosis and recovery pages, a setup check that creates missing HubSpot properties, logs, stats and data archiving with restore.

03

Key decisions

  1. Decision 1
    AI for search, code for rules

    The model decides what to search; spending limits, ranking and deduplication stay in deterministic code.

  2. Decision 2
    A human approves every push

    Nothing reaches HubSpot without review, which keeps the CRM clean.

  3. Decision 3
    Domain is the company key

    Companies are upserted by domain with a uniqueness check, so reruns don't create duplicates.

  4. Decision 4
    Everything resumable

    Long jobs survive timeouts and rate limits and pick up where they stopped.

04

Where it stands

So far the pipeline has processed about 296,000 records across 86 runs and pushed more than 37,000 approved contacts to HubSpot, with email coverage around 54%.

It runs as a standalone PHP and MySQL application with 9 tables and a long history of schema upgrades. Work continues; user login is planned for the next phase.

05

Stack

B2B lead intelligence pipeline

App
Standalone PHP and MySQL
AI
OpenAI Responses API, MCP tool calls
Data
Licensed B2B data provider (search + email finder)
CRM
HubSpot API: companies, contacts, associations, custom properties
My role
Design and development
06

More case studies