Use caseWorkflow automationAI agent
Every inbound lead researched, scored and routed before a rep opens it
Inbound leads enriched, scored against a written ICP rubric, checked against the CRM and routed to the right rep with a personal reply within minutes.
A blueprint, not a client story. The business described is illustrative; the architecture, integrations and trade-offs are real, and this is how I would build it. By Ergini, .
The short version
An automated workflow that takes every inbound lead from your forms, chat and WhatsApp, researches the company, and scores it against an ideal customer profile rubric your team can read. It checks HubSpot or Salesforce for existing customers and open deals, routes by territory and rep capacity, and sends clear fits a personal reply with a booking link within minutes. Students, job seekers and vendors get a polite redirect. High-value leads go to a person immediately, and every score comes with its reasons.
- Best for
- B2B software companies and agencies with a few hundred inbound leads a month and too few SDRs to research each one properly.
- Connects to
- HubSpot, Salesforce, Enrichment provider (Clay or Apollo), Cal.com or Calendly, Slack, n8n
- The AI does
- Reads free-text form answers and company websites, pulls out the signals the rubric asks for, and drafts the first reply in the lead's language.
- People do
- Own the rubric, take every high-value lead personally, and review disqualifications and uncertain matches.
- Built as
- AI Workflow Automation, usually $15K - $30K
Three hundred form fills and two people to read them
Take a B2B software company selling to mid-sized manufacturers. Around 300 inbound leads a month arrive from the demo form, the pricing page, webinar sign-ups, the chat widget, and a WhatsApp number printed on the trade-show banner. Two SDRs work all of them. HubSpot creates a contact for every submission and assigns it round-robin, whoever the lead turns out to be.
Response speed matters, and everyone on the team knows it. The bigger leak is what happens before the first reply. An SDR opens the record, looks up the company, guesses its headcount, searches HubSpot to see whether it is already a customer, and only then decides whether this is a real opportunity, a student writing a thesis, a job applicant who used the wrong form, or an agency trying to sell them something. In this scenario that is ten to fifteen minutes per lead, done slightly differently by each person.
Meanwhile the pipeline fills with contacts nobody will ever work, and the good lead that arrived on Friday evening falls through the cracks until Monday. Existing customers asking about an upgrade get a first-touch sales email from a stranger. When a month is slow, the head of sales cannot tell a demand problem from a triage problem, because the reasons behind every decision live in two people's heads.
The rubric, written down where everyone can read it
Scoring here is a published rubric, not a model's opinion. The model's only job is to find evidence in messy text; code adds up the points, and the thresholds belong to sales leadership. An example for a company that sells to manufacturers:
| Signal | Where it comes from | Found by | Points |
|---|---|---|---|
| 50 to 1,000 employees | Enrichment, by email domain | Code | +25 |
| Manufacturing or wholesale | Enrichment, checked against the company's own website | Model reads the site, code compares | +20 |
| Runs an ERP you integrate with | Form answer or website | Model extracts, code scores | +15 |
| A stated project or deadline | The free-text message | Model extracts, with the sentence as evidence | +15 |
| Inside your sales territories | Enrichment and phone prefix | Code | +10, or out of scope |
| Free email domain (gmail.com, gmx.de, outlook.com) | The address itself | Code | -15, never an automatic rejection |
| Student, job seeker, vendor or competitor | Message and domain | Model classifies, code routes | Own path, no score |
From form submission to the right rep's calendar
Two model calls sit inside a pipeline that is otherwise ordinary code. The score, the route and anything that commits a rep's time are rules.
01 Trigger · HubSpot form webhook, WhatsApp Cloud API
A lead arrives
A form submission, a chat transcript or a WhatsApp message hits a webhook. Every channel is normalized into one lead record, with the raw text kept alongside it.
02 Plain code · HubSpot CRM search API, Salesforce SOQL
Match against the CRM before anything else
The email and domain are checked against contacts, companies and open deals before any enrichment money is spent. An existing customer goes to their account manager and an open deal to its owner, and scoring stops there.
03 System · Clay or Apollo API
Enrich the company
The domain goes to the enrichment provider for headcount, industry, country and technology. Results are cached per domain, so the same company is never paid for twice in a quarter.
04 AI model · Structured output
Extract the signals
A model reads the message and the company's website and fills a fixed schema: stated need, timeline, systems mentioned, and whether this is a buyer, a student, a job seeker or a vendor. Every extracted signal carries the sentence it came from.
05 Plain code
Score against the rubric
The rubric runs as code, versioned in git, so any score can be explained line by line and replayed after the rubric changes.
06 Decision
Which path does this lead take?
Thresholds and routing tables decide, never the model.
- Above the threshold, inside a territory then the owning rep by territory and capacity, with a reply and booking link sent within minutes
- Enterprise-sized, or on the target-account list then a Slack alert to a person straight away, and no automated reply
- Student, job seeker or vendor then a polite redirect to the careers page or the right address, and the record is marked as not a lead
- Form and enrichment disagree, or the classification is uncertain then the review queue
07 AI model
Draft the first reply
A model writes a short reply in the lead's language that responds to what they actually asked and offers the rep's booking link. It may only use facts from the form and the enrichment record: no invented case studies, no discounts.
08 Person · Slack
People take the edges
Reps get high-value leads and the review queue; the head of sales samples disqualifications daily. Overriding a score takes one click and a reason, and the reasons drive the next rubric review.
09 Result
Everything written back with its reasons
Score, points per signal, route, the reply and the evidence quotes land in CRM properties and a timeline note. Writes are keyed on the submission ID, so a retried webhook cannot create a second contact or send a second email.
A Thursday evening demo request, followed through
One submission from the demo form, the lookups behind it, and the reply that went out while the SDRs were at home.
Demo form, Thursday 19:42
Lead · Demo form
Jana, j.novak@[company].de. We are replacing our quoting spreadsheet before we move to Business Central in Q1. Three sales engineers. Can you import our existing price lists?
- crm_match(email: "j.novak@[company].de")no contact / no company on this domain / no open deals
- enrich(domain: "[company].de")drive components manufacturer / 140 employees / Germany / cached for 90 days
- extract_signals(message, website)need: replace quoting spreadsheet / timeline: Q1 / systems: Business Central, planned / type: buyer / 2 evidence quotes
- score(rubric: "v7")size +25 / industry +20 / ERP +15 / timeline +15 / territory +10 / total 85 / route: rep
- assign(territory: "DACH", check_capacity: true)Tobias: 11 untouched leads, cap 15 / assigned / booking link carries the lead ID
Workflow · Email
Hi Jana, thanks for the detail on the quoting spreadsheet and the move to Business Central. Tobias looks after manufacturers in Germany and can walk you through importing your price lists. You can pick a 30-minute slot with him here: [booking link]. This reply came from our automated assistant; Tobias is the person you will speak to.
- Slack message to Tobias with the score, the points per signal and the two quotes. Properties and a timeline note written to HubSpot.
Who decides what, lead by lead
The AI model
Pull need, timeline and systems out of free text
Form messages are unstructured and multilingual, which is exactly what models handle well.
Tell a buyer from a student, a job seeker or a vendor
The same form receives all four, and keyword rules misfire on every one of them.
Write the first reply
Short, specific and in the lead's language, limited to facts already on the record.
Plain code
Match against customers and open deals
A deterministic lookup on email, domain and company ID, run before anything is spent or sent.
Add up the score
A versioned rubric that a rep can read, argue with and replay.
Assign by territory and capacity
Routing tables and caps, so nobody's calendar depends on a prompt.
A person
Enterprise and target-account leads
The first conversation there is worth too much to hand to a template.
Change the rubric
Sales leadership owns what a good lead is. The system only applies the definition.
Where lead automation quietly goes wrong
None of these appear in a demo. All of them appear in the first month of real traffic.
Enrichment matches the wrong company
The domain is the anchor, never the company name: 'Schmidt' matches hundreds of firms, a domain matches one. When the form's company name and the enrichment record disagree, or the domain belongs to a group with several subsidiaries, the lead goes to review instead of being scored on someone else's headcount.
An existing customer gets a cold sales email
The CRM match runs before enrichment and before any reply. A new contact at a customer's domain goes to the account manager with the account context, because a question from a paying customer is not a lead. Once a meeting is booked, the CRM update agent keeps the deal record honest from there.
Competitors and vendors in the demo queue
Competitor domains sit on a maintained list; those leads never receive pricing material or a booking link, and the head of sales gets a note. Vendors pitching their own services get one polite pointer to the right address, and the workflow never enters a conversation with them.
One rep drowns while another waits
Plain round-robin ignores holidays and backlog. Assignment checks each rep's untouched leads and out-of-office status, skips anyone over the cap, and alerts a person when everyone is full instead of stacking leads on whoever is next.
The rubric drifts away from the market
A weekly job compares score distributions and win rates by score band. If leads scoring 40 to 60 start converting as well as those above 60, the thresholds are wrong, and the head of sales sees it in numbers rather than in a feeling.
Collecting personal data you have no reason to hold
B2B enrichment rests on legitimate interest under GDPR Article 6(1)(f), documented in a short assessment, and it stays at company level plus business contact details. No scraping of personal social profiles, and the privacy notice names the enrichment sources, because Article 14 requires telling people about data you did not collect from them directly.
Switching it on in three stages
Automated replies go out in a rep's name, so they are the last thing to be switched on.
- Scoring only, for the first two weeks. Every lead is scored and routed in the background while the SDRs work as before. The team compares its calls with the system's and argues about the rubric, which is the point.
- Drafts next. Replies are drafted onto the record for the assigned rep to send, and disqualifications wait for one click. The share of drafts sent without edits decides which lead types go automatic.
- Autonomy for the clear cases. Strong fits get their reply and booking link automatically, and so do students and job seekers. Enterprise leads, target accounts and the review queue stay with people permanently.
Every automated reply says it came from an assistant. Since 2 August 2026, Article 50 of the EU AI Act expects that disclosure when people interact with an AI system, and one sentence covers it; the Article 50 guide has the detail.
Breeze, Agentforce or Chili Piper first, or a build of your own?
If you are on HubSpot Professional or Enterprise, look at Breeze first. Its agents work inside your HubSpot data, Agent Hub is available on those tiers, and custom agents consume HubSpot Credits per action. On Salesforce, Agentforce is priced at $2 per conversation, which is reasonable at moderate inbound volume. If your real problem is only fast routing and booking, Chili Piper or LeanData solve it without any AI, and I will tell you that on the call.
A build wins when the rubric depends on things those tools cannot see: product usage data, an ERP or partner list, a WhatsApp channel, or signals in free text that need your own definitions. It also wins on HubSpot Starter, where Breeze agents are not an option, and whenever a skeptical sales team needs every score explained, because the rubric is code you own rather than a vendor's model. The research side goes deeper in my post on building an AI lead generation tool.
Often the answer is both. HubSpot or Salesforce stays the system of record, Cal.com or Chili Piper handles the calendar, and the custom part is the matching, enrichment and scoring layer in between, writing into ordinary CRM properties your existing reports already use. That middle layer is typical workflow automation work.
How you would know it is working
A blueprint has no results to report, so here is what I would measure from the first week instead, on your own data.
- Time to a relevant first reply
- From submission to a reply that answers what the lead asked, split into working hours, evenings and weekends.
- Rep agreement with the score
- The share of routed leads a rep keeps instead of overriding, read together with the reasons they gave.
- Conversion by score band
- Meetings held and opportunities created per band. This is what tells you whether the thresholds sit in the right place.
- Misroutes
- Existing customers or open deals that reached a new-business rep, counted weekly. The target is zero, and every case becomes a test.
- Research minutes per lead
- Sampled before and after launch, so the time saved is measured on your team rather than assumed.
What a build like this costs
This is built as AI Workflow Automation, which runs $3.5K - $60K overall. A build like this one usually lands in the multi-step workflow tier: $15K - $30K, 3-5 weeks. The first working version runs on your real data well before the end of that window.
What it costs to run
Enrichment is usually the largest line, billed per record or credit by the provider, which is why results are cached per domain. Model costs for extraction and a short reply are cents per lead at a few hundred leads a month. Hosting is a small fixed monthly cost, or part of an n8n instance you already pay for.
What moves the price
- How many entry channels: forms and chat are simple, while WhatsApp adds templates, opt-in and Meta's review
- The state of the CRM: a tidy HubSpot portal is quick, a Salesforce org with custom lead-to-account logic and years of duplicates is not
- How specific the rubric is, and whether it needs product usage, ERP or partner data beyond the enrichment provider
- Routing complexity: territories, named accounts, capacity caps, holidays and more than one language
Who this is for
- B2B software companies with a few hundred inbound leads a month and one or two SDRs doing all the research by hand
- Agencies whose contact form brings in real briefs, job applications and other agencies selling services, all mixed together
- Teams on HubSpot Starter or a mixed stack, where the CRM's own agents are unavailable or cannot see the data that matters
- Sales leaders who want every score explained in plain sentences before they let anything route automatically
Questions people ask about this
How do I automate lead qualification without annoying good leads?
Automate the research and routing first, and the replies last. Scoring runs on a written rubric, existing customers are caught before anyone emails them, and the first reply is short and specific to what the lead asked. Only clear-cut cases are answered automatically; anything uncertain goes to a person, so good leads get a faster and more relevant answer than before.
Can AI score leads accurately?
It can find the evidence accurately, which is the hard part. Here the model extracts signals from free text and websites, each with the sentence it came from, and plain code adds up points against your rubric. Accuracy is then measured rather than assumed: rep overrides and conversion by score band show within weeks whether the rubric fits your market.
Does this work with HubSpot and Salesforce?
Yes. Both have mature APIs for searching contacts and companies, writing custom properties and assigning owners, and HubSpot also runs an official MCP server. The workflow writes scores, reasons and routes into ordinary CRM fields, so your existing views, reports and sequences keep working as they are.
Can I connect WhatsApp Business to HubSpot for lead qualification?
Yes, through the WhatsApp Business Platform. Qualifying leads is an allowed use under Meta's business terms, as long as the bot serves your own business and offers a clear route to a person. Conversations sync to the contact in HubSpot, and any message sent more than 24 hours after the lead's last one needs an approved template.
Is enriching inbound leads allowed under GDPR?
For B2B leads it normally rests on legitimate interest, documented in a short balancing assessment. Keep enrichment to company data and business contact details, stay away from personal social profiles, name your enrichment sources in the privacy notice, and set a retention period for leads that never convert. Your data protection officer should sign off the assessment.
How long does it take to set up?
The first version, scoring real leads in the background, usually runs within two to three weeks. Most of that time goes into the rubric and the CRM matching rather than the model. Drafted and automatic replies follow once the team trusts the scores, and that decision is made on data from the scoring-only period, not on a demo.
Sources