# Auto-build a deal battlecard from past wins and losses

> When a deal reaches qualification, your rep gets a short brief on the closest past deals, what won or lost them, and which case studies to send.

- Workflow type: agent
- Services: Pinecone, HubSpot, Slack
- Categories: Sales
- Published: 2026-08-09

## What it does

- Fires the moment a deal moves into a qualification stage in your CRM, so the brief arrives while the rep is still working the deal.
- Searches your library of past deal notes, win/loss write-ups and case studies to find the deals that genuinely resemble this one.
- Writes a short battlecard covering what won or lost those deals, the objections that came up, and the two case studies worth sending.
- Saves the brief onto the deal record and sends the same text to the deal owner in Slack.

## What you'll need

- A HubSpot account with a sales pipeline that has a qualification stage.
- A Pinecone index that already holds your past deal notes, win/loss write-ups and case studies.
- A Slack workspace so the brief can reach the person who owns the deal.
- Deal owners filled in on your deals, so each brief goes to the right rep.

## Prompt

When a deal in HubSpot moves into a qualification stage, I want an agent to build a short battlecard for whoever owns it. Trigger this from a HubSpot webhook on deal stage changes, and only continue when the new stage is one of my qualification stages. Ignore stage changes that move a deal anywhere else.

Start by pulling the record with Get Deal using the deal ID from the webhook payload. Read the deal name, the associated company, the amount, the current stage and the owner. If industry is not set on the deal itself, follow the associated company and read it with Get Company. Resolve the owner with Get Owner so you have their name and email address.

Then search my Pinecone index of past closed deal notes, win/loss write-ups and case studies with Search Records to find the most similar deals we have already run. Build the query text out of what you just read: company name, industry, deal size, and anything else on the record that describes the shape of the deal. Ask for around ten matches and use reranking so the strongest comparisons come back first.

Only cite a past deal if its similarity score is above a threshold I can adjust. Default the threshold to 0.75 and put it somewhere obvious at the top of the workflow so I can tune it without digging through the logic. Discard everything below the threshold rather than demoting it to a weak mention. If nothing clears the threshold, say plainly that we have no close comparison for this deal in the index and stop there instead of stretching a weak match into false confidence. A brief that tells me there is no precedent is more useful than one that confidently cites a deal that is not really similar.

Write the battlecard as short plain text, no more than about 300 words. Cover which past deals resemble this one and why, what won or lost each of them, the objections that came up and how they were handled, and the two case studies worth sending to this buyer. Name every past deal you cite and note how close the match is, so the rep can judge the evidence rather than taking the summary on trust.

Attach the finished brief to the deal with Create Note, associated with the deal record so it shows up on the timeline. Then send the same text to the deal owner in Slack: open a direct message channel to them with Open a Conversation and post the brief with Send a Message, including a link back to the deal in HubSpot. If the owner cannot be matched to a Slack member, fall back to posting the brief in a sales channel I name and mention the owner by name in the text.

Assume the Pinecone index is already populated with past deal notes, win/loss write-ups and case studies. This workflow only reads from the index, it should never write back to it.

## How to customize

- The similarity threshold, which decides how close a past deal has to be before it gets cited. Raise it for only very strong matches, lower it if you would rather see more comparisons.
- Which pipeline stage sets this off, and how many past deals and case studies the brief includes.
- Where the brief lands: a direct message to the deal owner, or a shared sales channel the whole team can see.

## FAQ

### What happens if none of our past deals are a good match?

It tells you so directly. The brief will say there is no close comparison in your library and stop there, rather than padding the page with a loosely related deal. That is deliberate: a battlecard that confidently cites a deal which is not really similar is worse than one that admits there is no precedent.

### Where does the past deal knowledge actually come from?

From a Pinecone index you have already filled with your own closed deal notes, win/loss write-ups and case studies. This workflow only reads from that library, it never writes to it. Many teams keep those documents in Notion or a shared drive and sync them across on a schedule.

### Will this change anything in our CRM?

It only adds. The brief is attached to the deal as a note on the timeline, and nothing on the deal itself is edited or overwritten.

### Can the brief go to a shared channel instead of a direct message?

Yes. By default it goes straight to the deal owner so it does not add noise, but you can point it at a sales channel instead, or do both if you want the wider team to see which deals have precedent.

### Does this work on a standard HubSpot plan?

The deal and note features it relies on are available on standard HubSpot plans. If your plan cannot send the automatic signal when a deal changes stage, you can run the same workflow on a schedule and have it pick up deals that recently entered qualification.

Use this prompt in General Input: https://www.generalinput.com/prompts/auto-build-a-deal-battlecard-from-past-wins-and-losses