Skip to content
MiraiTech
All work

Case study · AI

Sales pipeline automation

Website leads come in, the system scores their intent, updates HubSpot, books a demo through Calendly, tells the sales rep and runs the follow-up sequence. People step in for the conversations that need them.

Year
2026
Duration
3.5 months
Type
AI
Status
In production
Sales pipeline automation, main screen

Results

  • 85% of SDR tasks automated
  • 93% qualification accuracy
  • $187k of pipeline from 1,000 leads a month

The problem

Sales development teams qualify 100+ inbound leads a day by hand: reading form submissions, scoring intent, updating the CRM, scheduling demos and writing follow-up emails. SDRs spend 70% of their time on this instead of on sales conversations, and 40% of qualified leads go cold because follow-up takes too long.

What we built

We built a set of LangGraph agents that capture website leads, score intent with Claude, update HubSpot, schedule demos through Calendly and run personalized follow-up sequences without manual steps. The system handles 85% of the SDR workflow with 93% accuracy, processes 1000+ leads a month and has generated $187k in qualified pipeline.

Lead scoring
Claude Sonnet 4 scores intent from the form data, company context scraped from the lead's website and historical conversion patterns. Leads that mention "Enterprise RAG" score 3x higher than generic "AI chatbot" inquiries.
CRM updates
Every action on a lead (scoring, emails sent, demos scheduled, follow-ups completed) is logged in HubSpot with an audit trail. Sales managers see the pipeline move in real time without manual data entry.
Personalized follow-ups
Claude drafts follow-up emails that refer to the lead's use case, company size and the problems they described. Open rates average 42%, against an industry norm of 21%.
Live workflow dashboard
A Next.js dashboard shows where each lead is in the pipeline in real time: scores, CRM updates, scheduled demos, and conversion funnel analytics with ROI figures.
Routing by intent
High-intent leads get a Calendly link right away and sales is notified. Low-intent leads go into a nurture sequence. When intent is unclear, the system sends an email asking for more detail.

How it works

An event-driven pipeline that scores each lead, updates the CRM and routes the lead by intent.

  1. 01

    Lead capture

    Website form submission → webhook → lead data extraction + company enrichment

  2. 02

    Intent scoring

    Claude Sonnet 4 reads the lead context → intent class (High / Medium / Low) + score 0-100

  3. 03

    CRM update

    HubSpot contact created or updated → deal pipeline stage set → owner assigned by territory

  4. 04

    Routing

    High intent → Calendly link + Slack alert to sales; low intent → nurture sequence; unknown → clarification email

  5. 05

    Follow-up

    Personalized email sequence starts → open and click tracking → escalation when the lead engages

  6. 06

    Analytics

    Live dashboard: conversion funnel, ROI metrics, pipeline value and lead source attribution

Screens

Sales pipeline automation, screen 1
1 / 2

Decisions

LangGraph 0.2.5AI / ML
Qualifying a lead takes judgment that n8n or Zapier rules cannot express. A decision like "this lead mentions compliance requirements, so route it to enterprise sales" does not fit in a static workflow node.
SupabaseData
Lead analytics (conversion funnels, cohort analysis) need queries that are painful in NoSQL, so we picked Supabase, which runs on Postgres, over Firebase. Row-level security handles multi-tenant data isolation.
HubSpot APIBackend
Most target clients (startups and mid-market companies) already use HubSpot, so we integrated it instead of Salesforce. Its API supports custom properties, deal pipelines and email tracking directly, which made the integration 60% simpler than with Salesforce's SOAP API.
SendGridInfrastructure
SendGrid over SES for its deliverability analytics and domain warming tools. Cold outreach needs 95%+ inbox placement, and SendGrid's IP reputation management made that achievable.

What went wrong

Lead scores sales did not trust

Problem
The first version scored intent as qualified or unqualified, with 60% accuracy. Sales received too many weak leads and stopped trusting the system. After 2 weeks, reps were ignoring automation-qualified leads altogether.
Fix
We replaced it with a model that combines several signals: form text (30%), company data from Clearbit (25%), historical conversion patterns (25%) and engagement (20%). Sales reps rate lead quality, and their ratings retrain the model every week.
Result
Scoring accuracy went from 60% to 93%. The sales team's acceptance rate rose from 35% to 89%, and pipeline value from automated leads grew 3.2x.

Follow-ups landing in spam

Problem
Sending 500+ personalized follow-ups a day from a new domain put 35% of them in spam. Gmail and Outlook flagged the sending pattern as bulk automation, which made the follow-up sequences useless.
Fix
We warmed the domain over 6 weeks with SendGrid, raising daily volume from 20 to 500 emails. We set up DKIM, SPF and DMARC, randomized send times and capped sending at 50 an hour so the pattern looks more like a person sending mail.
Result
Inbox placement rose from 65% to 96%. Open rates settled at 42%, 2x the industry average for automated outreach.

Team and stack

Hiroshi designed the automation graph and built the live dashboard. Kenta built the LangGraph agents and the HubSpot, Calendly and SendGrid integrations. Hiroki built lead enrichment, the Supabase analytics and the weekly retraining of the scoring model.

  • LangGraph
  • Claude Sonnet 4
  • HubSpot API
  • Calendly
  • Supabase
  • Next.js 15
  • SendGrid
  • Stripe