Sales CRM Automation With Claude and Apollo
An end-to-end inbound lead flow. Webhook to Apollo enrichment to Claude triage to CRM to Slack. Prompt templates, confidence thresholds, and guardrails that keep false positives out of your Tier 1...
Most inbound sales teams lose their edge in the first fifteen minutes after a lead fills a form. Someone has to read the submission, guess at the company, look them up on LinkedIn, decide whether a rep should touch it, and drop a note into Slack. By the time that happens the lead has either gone cold or been scooped by a faster vendor. The fix is not a smarter salesperson. It is a pipeline that enriches, classifies, and routes every inbound in under thirty seconds without burning a CRM record on the half of submissions that are clearly not a fit.
This article is the end-to-end flow we build for founders who are running sales themselves or leaning on a single SDR. The spine is a webhook into a workflow runner, Apollo for enrichment, Claude for triage, a CRM write with a tier tag, and a Slack ping to the rep only for top-tier leads. The hard parts are not the connectors. The hard parts are the classification prompt, the confidence threshold that decides when the automation defers to a human, and the discipline to push only enriched data into the CRM so your pipeline stays clean. Each of these is detailed below with the exact prompt templates and the guardrails that prevent Tier 1 alerts from eroding into noise.
The Node Flow End To End
The flow has six stages and runs in a single workflow inside n8n, Make, or a custom Python worker. The specific runner matters less than the fact that every stage is idempotent and logs to the same trace ID so you can replay any bad call later.
Stage one is the webhook. Your form vendor, whether that is Typeform, HubSpot forms, Webflow, or a custom signup, fires a POST to the workflow with the raw submission. The workflow immediately writes a row to a staging table keyed on a UUID. Nothing else happens yet. This staging row is the audit trail. If Claude or Apollo returns something strange three hours later and you need to debug it, the staging row is where you start.
Stage two is Apollo enrichment. The workflow takes the work email from the submission and calls the Apollo people match endpoint, then the organization enrich endpoint using the returned domain. This gives you the prospect's title, seniority, department, location, employee count, industry, technologies in use, estimated revenue, and funding history. Apollo sometimes returns partial data. That is fine and the prompt handles it. What you must not do is let the workflow proceed if the email domain is a freemail provider like gmail or outlook and the form did not include a company name. Freemail without company context is the single biggest source of false Tier 1 alerts and should short-circuit to a Tier 3 bucket without even hitting Claude.
Stage three is the Claude triage call. The workflow packages the enriched payload plus the raw form submission into a single JSON object and sends it to Claude with a classification prompt that returns a structured verdict. Stage four takes the verdict and decides what to do next based on tier and confidence. Stage five writes the enriched record and the verdict to the CRM. Stage six sends the Slack notification only if the lead is Tier 1 and confidence is above threshold. The rest of this article is the detail inside stages three through six.
The Classification Prompt That Returns Clean JSON
Claude is good at judgment but only if the prompt forces a constrained output. The classification prompt below is the one we ship in production. It assumes you have already defined three tiers in your ICP and that you know which signals matter. The prompt reads the enriched payload, applies your criteria, and returns a JSON object with four fields.
The prompt template starts by defining the role and the output contract, then lists the tier criteria, then gives the payload, then asks for the verdict. The output contract comes first because Claude is more likely to honor a structured response when the shape is declared before any reasoning happens.
You are a sales triage analyst. Read the lead payload below and classify
it into one of three tiers based on the criteria provided. Return only
a JSON object with these keys and no other text:
{
"tier": 1 | 2 | 3,
"reason": "one sentence explaining the tier decision",
"confidence": 0.0 to 1.0,
"missing_signals": ["list of fields that would improve confidence"]
}
TIER CRITERIA:
Tier 1: B2B SaaS or ecommerce, 50 to 500 employees, decision-maker
title (Director, VP, Head of, Founder, C-level), North America
or Western Europe, uses Shopify or a modern data stack.
Tier 2: Matches two of the Tier 1 criteria but not all.
Tier 3: Freemail domain, student, agency reseller, competitor,
company size under 10, or clearly out of ICP.
Confidence should reflect how much of the payload supported your
decision. If key fields are missing, lower confidence and list
them in missing_signals. Never invent data. If the payload does
not let you decide, return tier 2 with low confidence.
LEAD PAYLOAD:
{{enriched_json}}
A few things matter in that prompt. The output keys are declared before the criteria, which keeps Claude from drifting into a free-text answer. The phrase "never invent data" is doing real work; without it Claude will sometimes fabricate an industry or headcount to justify a tier. The missing_signals array is there to feed a later loop where your ops team can see which fields most often block confident triage and decide whether to collect them on the form.
Temperature should be set low, around 0.2, so the classification is reproducible across reruns. Use the model that gives you the best latency-to-quality trade for your volume. For most inbound SaaS flows Claude Haiku handles this prompt in under a second and produces near-identical results to larger models.
False Positive Guardrails
A Tier 1 alert that turns out to be garbage is worse than no alert at all. Reps lose trust in the pipeline, they start ignoring Slack pings, and the whole system decays. The guardrails below are what keep Tier 1 alerts accurate enough that reps respond inside five minutes.
The first guardrail is a confidence threshold. Any Claude verdict with tier equal to 1 and confidence below 0.75 is demoted to Tier 2 automatically. You can tune the threshold over time. We start at 0.75 and move it down only if the Tier 2 bucket is catching too many genuine Tier 1 leads. Moving it up to 0.85 is common after the first month of tuning. The point is that low-confidence Tier 1 verdicts never page a rep. They land in the CRM with a tag and get worked in normal cadence.
The second guardrail is human override. Every Slack notification includes two buttons, "Confirm Tier 1" and "Demote." Overrides write back to the staging table with the reason. Once a week the ops owner reviews the overrides and either tunes the prompt, tunes the threshold, or tightens the ICP criteria. This review loop is not optional. Without it the prompt drifts away from what your sales team actually considers hot.
The third guardrail is domain exclusions. Keep a list of known competitor domains, agency domains, and consulting firms that tend to fill out inbound forms for research. These never reach Claude. The webhook checks the domain against the list and routes directly to Tier 3. This is both cheaper than calling Claude and more reliable than hoping the prompt will recognize a competitor.
The fourth guardrail is a sanity check on Apollo enrichment. If the returned employee count is less than five or greater than twenty thousand and your ICP is mid-market, skip the Claude call entirely and assign Tier 3. Apollo is accurate enough on headcount that a hard boundary here removes a large chunk of false positives without any model reasoning.
Only Enriched Fields Go To The CRM
The single most important discipline in this flow is the rule that only enriched, validated fields get written to HubSpot or Pipedrive. The raw form submission lives in the staging table forever. The CRM only sees the Apollo-verified name, company, domain, title, employee count, industry, and the Claude verdict fields. This rule exists because CRMs are the long-term memory of your sales org. Garbage data in the CRM compounds. A misspelled company name, a wrong title, an industry the prospect did not actually work in, these errors poison segment filters, email sequences, and reporting for years.
When Apollo cannot enrich a lead the record goes to an unenriched queue rather than to the CRM. An SDR reviews the unenriched queue once a day and either enriches manually, marks it as spam, or pushes it through with a flag. The CRM record created from a manual enrichment carries a tag that says the source was human so you can distinguish data quality tiers later.
The CRM write itself is a single call that creates or updates the contact, the company, and a deal with the tier tag. Use a tier custom field with allowed values Tier 1, Tier 2, and Tier 3 rather than free text, so filters and automations downstream can rely on the value. Add a second custom field for Claude confidence score. When a deal closes or is lost, the confidence score lets you measure how well the model's verdicts predicted real outcomes. This is the only way to know whether the triage prompt is actually earning its cost.
In HubSpot the write is a single call to the contacts upsert endpoint with a property update, a company association, and a deal creation in a workflow step. In Pipedrive the pattern is a persons search, a persons update or create, and a deals create. Either CRM happily accepts the tier tag in the same payload, so the whole write is atomic and a failure at any step rolls back the previous steps inside your workflow runner.
The Slack Notification That Earns A Response
Tier 1 leads fire a Slack message to the rep who owns the territory or to a round-robin channel if you do not route by territory yet. The message is formatted so the rep can decide whether to act without leaving Slack. The fields we include are the prospect name and title, the company name and headcount, the industry, the form submission text, the Claude reason, the confidence score, a link to the CRM record, and two buttons for Confirm and Demote.
The reason field is the persuasion. A Slack ping that says "new Tier 1 lead" gets ignored. A Slack ping that says "VP Engineering at a 180-person Shopify Plus brand, wrote in asking about checkout performance, confidence 0.89" gets a response in under five minutes. The Claude reason field is one sentence of context that tells the rep why this is worth their time, pulled directly from the triage call. That sentence is the difference between a pipeline that accelerates the team and a pipeline that becomes another notification source to mute.
Do not send Slack messages for Tier 2 or Tier 3. They sit in the CRM, get picked up by normal nurture sequences, and get worked during regular prospecting time. The whole point of Tier 1 alerts is that they are rare and real. If your Tier 1 volume exceeds one or two per day for a single rep, tighten the criteria or raise the confidence threshold. Alert fatigue is the failure mode that kills these systems.
What Breaks In Production And How To Fix It
Every version of this flow has failed in one of four specific ways in the first month. First, Apollo returns stale data for fast-growing companies. A startup that doubled in the last six months shows older headcount. Add a date-of-last-update check and apply a confidence penalty inside the prompt. Second, Claude occasionally returns markdown code fences around the JSON despite being told to return plain JSON. Strip fences defensively before parsing. Third, webhooks fire twice on form retries, and without an idempotency key the CRM gets duplicates. Use the form submission ID as the key in the staging table and short-circuit on repeats. Fourth, Slack messages delivered at two in the morning get missed. Add a quiet-hours rule that queues Tier 1 alerts overnight and fires them at eight in the morning with a "queued overnight" tag.
Each of these is a one-hour fix once you know to look for it. They will happen in your first thirty days, so build them in from the start.
What This Setup Costs And What It Earns
The build is roughly twenty-five hours of engineering, including Apollo setup, Claude API integration, CRM property configuration, Slack app install, and the first round of prompt tuning. Monthly running cost is about eighty dollars for Apollo credits, five to twenty dollars for Claude calls, plus your workflow runner.
The return shows up in two places. Reps stop spending thirty to sixty minutes a day triaging their own inboxes, which is three to four hours of real selling time returned each week per rep. And the response time on genuine Tier 1 leads drops from a median of four hours to under ten minutes, which on inbound SaaS traffic correlates with a meaningful lift in booked meetings. The exact lift varies by industry and price point, but in the flows we have measured it lands between fifteen and thirty percent more meetings held per hundred inbounds without any change in ad spend or form conversion.
If you want us to build this for your stack, the WitsCode sales automation build is the shortest path. We install the flow, tune the prompt against your last ninety days of leads, configure the guardrails against your ICP, and hand off a workflow that your ops owner can edit without writing code. Start a WitsCode sales automation build >
Get weekly field notes.
Practical writing on shipping products, straight to your inbox. No spam.
Need help with this?
Custom Web Applications
We design and build web apps, MVPs, and SaaS products. Talk to us about what you are working on.
Talk to usWant to discuss non-tech founders for your business?
Start a project and we'll talk through where you are, what's working, and the highest-leverage moves for the next 90 days.