Daily
Get a short review of every lost deal
When a deal moves to closed lost, you get a blameless write-up of what happened, based on the deal notes.
- Runs
- Daily
- Apps
- HubSpot
- AI
- Yes, uses the built-in AI allowance
- Access
- crm.objects.deals.read
Send this to your assistant
Create a ClickRuntime automation: every day at 6pm, find HubSpot deals that moved to closed lost since yesterday, write a short blameless review of each from its notes, and email it to me.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Every sales team has a closed-lost graveyard. Deals die for reasons that are rarely written down: the champion left, a competitor undercut on price, security review dragged for six weeks, the timing was wrong. Reps pick a dropdown reason like Price or No decision and move on. A leader asking why you lost 14 deals last quarter gets a pile of vague labels and no pattern, so the same mistakes repeat.
Each day, deals that moved into closed-lost since the last run are found, their notes and activity are read, and the built-in AI writes a short retrospective covering what happened, likely causes and what might have been done differently. The write-up is emailed to you.
It is aimed at sales leaders and revenue operations who want to learn from losses instead of just counting them.
What you get out of it
Losses turn into lessons
A written retrospective on each lost deal captures reasons that a dropdown cannot. Over weeks, patterns such as repeated security objections become clear and fixable. Each lesson is documented, so a new rep can learn from a loss that happened before they joined, which shortens ramp time.
Win rates improve through pattern spotting
When several write-ups mention the same competitor or stalled stage, you can adjust positioning, pricing or the sales process, which raises conversion on later deals. Small adjustments to messaging or pricing, informed by real losses, compound across every deal in the following quarters.
Coaching conversations are grounded
A manager can discuss a specific lost deal with the rep using a neutral summary, instead of relying on memory or defending a version of events. That makes feedback fairer, because both sides can refer to the same facts and not to competing recollections.
Reviews happen while details are fresh
A write-up the day after a loss is far more accurate than one assembled at quarter-end, when nobody remembers which email changed the mood of the deal. Early reviews also catch an easy fix, such as a missing follow-up, while another similar deal is still open.
Leadership sees why, not only how many
Revenue reports show the count of lost deals. These summaries show the reasons, which is what executives need when they decide where to invest. Those insights shape hiring, product feedback and territory decisions, which makes the review worth far more than the lost deal itself.
How it works
What happens, step by step
Once a day, the automation finds HubSpot deals that moved to closed lost since the last run.
It skips any deal it has already reviewed, and reads the notes on each new one.
AI writes a short, blameless review of what happened and what to try next time.
The reviews are emailed to you, one paragraph per deal.
Before it runs live
- Connect HubSpot
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other HubSpot steps into one automation
Under the hood
The code that runs this automation
import re, time
from clickruntime import on_trigger, credentials, http, ai, state, notify, report_fetched
API = "https://api.hubapi.com/crm/v3/objects"
@on_trigger
def run(event):
headers = {"Authorization": f"Bearer {credentials.connection('hubspot', 'work')}"}
since = state.get("since") or int((time.time() - 86400) * 1000)
deals = http.post(f"{API}/deals/search", headers=headers, json={"properties": ["dealname", "amount", "closed_lost_reason"],
"filterGroups": [{"filters": [{"propertyName": "dealstage", "operator": "EQ", "value": "closedlost"},
{"propertyName": "hs_lastmodifieddate", "operator": "GT", "value": since}]}]}).json()["results"]
report_fetched(len(deals))
if not deals:
return {"reviewed": 0}
reviews = []
for d in deals:
note_ids = [n["id"] for n in http.get(f"{API}/deals/{d['id']}/associations/notes", headers=headers).json()["results"]]
notes = [http.get(f"{API}/notes/{nid}", headers=headers, params={"properties": "hs_note_body"}).json()
["properties"].get("hs_note_body") or "" for nid in note_ids[:10]]
text = re.sub(r"<[^>]+>", " ", "\n".join(notes))[:6000]
retro = ai.generate(f"Deal: {d['properties']['dealname']}\nReason: {d['properties'].get('closed_lost_reason')}\nNotes:\n{text}",
system="Write a short, blameless review: what happened, why we lost, what to try next time.",
max_output_tokens=250).text
reviews.append(f"{d['properties']['dealname']}\n{retro}")
notify.email_me(f"Closed-lost reviews: {len(deals)} deals", "\n\n".join(reviews))
state.set("since", int(time.time() * 1000))
return {"reviewed": len(deals)}FAQ
Common questions
What does the AI read to write the review?
Will the review be sent to the deal owner too?
Does it need an AI key of my own?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Score new HubSpot leads and flag the best ones
New contacts get a fit score saved on their record, and the strongest ones are sent to you in Slack.
See how it worksAssign new HubSpot deals to the right rep
Deals without an owner are given to a rep based on the company's country and size, within minutes.
See how it worksPost HubSpot form submissions to Slack
Each new form submission shows up in Slack with the answers, within a few minutes.
See how it worksKeep exploring
Set up “Get a short review of every lost deal” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.