GTM Playbooks
ResearchAdvancedLast reviewed

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. 1

    Export closed-lost deals from HubSpot (last 90 days) to Clay

  2. 2

    Use Claygent to scrape deal notes and email threads

  3. 3

    Send notes to OpenAI API with prompt: "Categorize loss reason: competitor, budget, no decision, feature gap, or other"

  4. 4

    Aggregate results in Google Sheets with pivot table

  5. 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 review

Common 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.

Need help implementing a playbook?

Our team builds custom Clay workflows and AI automations for revenue teams.

Get it built for you