Analyze Lost Deals with Claygent and OpenAI
The problem
Lost deal reasons in CRM are vague ("pricing", "timing"). Reps rarely document specifics.
Implementation steps
- 1
Export closed-lost deals from HubSpot (last 90 days) to Clay
- 2
Use Claygent to scrape deal notes and email threads
- 3
Send notes to OpenAI API with prompt: "Categorize loss reason: competitor, budget, no decision, feature gap, or other"
- 4
Aggregate results in Google Sheets with pivot table
- 5
Share monthly report with sales leadership
The Clay steps in this workflow use data credits and actions on every record that returns a result. Check the monthly cost, cost per enriched record, and plan fit at your volume. Open the Clay credit calculator.
Template outline
The structure to recreate in your own workspace. Field names and thresholds are starting points.
Clay + OpenAI Workflow:
1. HubSpot integration: Pull closed-lost deals (last 90 days)
2. Claygent: Fetch activity timeline and notes
3. OpenAI GPT-4: Classify loss reason from notes
- Prompt: "Given these deal notes: {{notes}}, classify the loss reason as one of: Competitor, Budget, No Decision, Feature Gap, Other. Reply with one word."
4. Google Sheets: Aggregate by loss reason
5. Create pivot table for monthly reviewCommon questions
- How are lost deal reasons categorized?
- Each deal's notes go to the OpenAI API with a prompt that classifies the loss as one of five categories: Competitor, Budget, No Decision, Feature Gap, or Other, and replies with one word. A fixed list keeps the results countable.
- Which deals does the analysis cover?
- Closed-lost deals from HubSpot for the last 90 days, with each deal's activity timeline and notes pulled into Clay before classification.
- How are the results reported?
- The categories are aggregated in Google Sheets with a pivot table by loss reason, and the report goes to sales leadership monthly.
Keep going
Related playbooks
- Finance/FP&AIntermediate
Check Pipeline Coverage with Historical Conversion, Not Rep Probability
Pipeline coverage is usually reported as open pipeline over quota, or weighted by the probability reps enter in the CRM, so a quarter can look covered at 3x while the deals, at the rates they have actually closed in the past, fall well short of the number, and finance finds out late in the quarter.
HubSpot or SalesforceGoogle SheetsZapier or n8n+1Estimate: 2 hrs/week - RevOpsIntermediate
Measure Win Rate by Lead Source, Not One Blended Number
Ops leaders report one blended win rate, which hides that outbound, inbound demo requests, partners, and events convert and close very differently, so budget and SDR time keep going to the channels that look fine on average instead of the ones that turn pipeline into revenue.
HubSpot or SalesforceGoogle SheetsClaude or ChatGPTEstimate: 0.5 hrs/week - ResearchBeginner
Monitor Competitor Hiring to Spot Market Moves
Competitor intelligence is reactive. You learn about their new product after launch, not during the build.
ClayClaygentSlackEstimate: 2 hrs/week
Need help implementing a playbook?
Our team builds custom Clay workflows and AI automations for revenue teams.
Get it built for you