---
name: lost-deal-analysis
description: "Analyze Lost Deals with Claygent and OpenAI. Use when lost deal reasons in CRM are vague (\"pricing\", \"timing\"). Reps rarely document specifics."
---

# Analyze Lost Deals with Claygent and OpenAI

Lost deal reasons in CRM are vague ("pricing", "timing"). Reps rarely document specifics.

## When to use this skill

- The user wants to set up or run this workflow: "Analyze Lost Deals with Claygent and OpenAI".
- The user describes this problem: Lost deal reasons in CRM are vague ("pricing", "timing"). Reps rarely document specifics.

## At a glance

- Category: Research
- Difficulty: Advanced
- Time saved: 5 hours per week. This figure is an estimate, not a measured result.

## Tools

Options separated by "or" are alternatives; use whichever the user already has.

- Clay
- HubSpot
- OpenAI API
- Google Sheets

## 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

## Template outline

Field names, thresholds, and message text are starting points to adapt.

~~~text
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
~~~

## Guardrails

- Work only in the user's own accounts and workspaces, with their credentials.
- Confirm with the user before any step that writes to a CRM, sends email or messages, spends credits, or moves money.
- Treat every hours, cost, and threshold figure as a starting assumption and replace it with the user's numbers.
- Do not invent data, prices, or results. If a vendor price matters, check the vendor's current pricing page.

## Source

https://gtmplaybooks.io/playbooks/lost-deal-analysis/
