Skip to content

Weekly

Review each week's lost HubSpot deals with AI in Slack

Every Friday your sales channel gets the common reasons deals were lost this week and ideas for which ones to revisit.

Runs
Weekly
Apps
HubSpot, Slack
AI
Yes, uses the built-in AI allowance
Access
HubSpot deals read; Slack chat:write

Send this to your assistant

Create a ClickRuntime automation: every Friday, analyse this week's closed-lost HubSpot deals and post the reasons and revival ideas in #sales.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A B2B sales team marks deals as lost and moves on. The reasons are typed into a field nobody reads again, so the same objections about price or a missing feature come up quarter after quarter without anyone noticing the pattern.

A short Friday review turns those notes into something the team can act on. Patterns in lost deals reach product and pricing conversations, and the deals worth another try get a named next step.

What you get out of it

  • Patterns become visible

    One lost deal looks like bad luck. Five lost to the same competitor feature in a week is a signal you can take to product or pricing.

  • Some lost deals come back

    Deals lost on timing or budget often reopen next quarter. Revival ideas make sure someone follows up at the right moment.

  • Lost reasons get written properly

    When the team knows the notes feed a weekly review, they write clearer reasons. The data improves over time.

  • Learning without a meeting

    The review arrives in the channel, so everyone can read it in two minutes and reply in a thread.

How it works

What happens, step by step

  1. Every Friday, ClickRuntime finds the HubSpot deals marked lost during the week.

  2. It gathers each deal's name, amount and the reason your team recorded.

  3. AI groups the reasons into common themes and suggests which deals are worth another try.

  4. The review is posted in your #sales Slack channel.

Before it runs live

  • Connect HubSpot
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsWeekly
Review each week's lost HubSpot deals with AI in Slacktoday, 9:00Succeeded
Slack · #salesLost deals this week (5): 3 lost on price against annual budgets. Revisit Acme Logistics in January when their new budget opens.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

  • Run it at a different time, more or less often, or only on weekdays
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Google Sheets
  • Combine it with other HubSpot and Slack steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
lost_deal_analysis.pyexample
from datetime import datetime, timedelta, timezone
from clickruntime import on_trigger, credentials, http, ai, notify

@on_trigger
def run(event):
    since = str(int((datetime.now(timezone.utc) - timedelta(days=7)).timestamp() * 1000))
    body = {"filterGroups": [{"filters": [{"propertyName": "dealstage", "operator": "EQ", "value": "closedlost"},
                                          {"propertyName": "closedate", "operator": "GTE", "value": since}]}],
            "properties": ["dealname", "amount", "closed_lost_reason"], "limit": 100}
    deals = http.post("https://api.hubapi.com/crm/v3/objects/deals/search", json=body,
                      headers={"Authorization": f"Bearer {credentials.secret('HUBSPOT_API_KEY')}"}).json().get("results", [])
    if not deals:
        notify.slack("No deals were lost this week.", channel="#sales")
        return {"lost": 0}
    lines = "\n".join(f"{d['properties']['dealname']} ({d['properties'].get('amount')}): {d['properties'].get('closed_lost_reason') or 'no reason'}"
                      for d in deals)
    review = ai.generate("Group these lost deals into common reasons, then suggest which to revisit and how:\n" + lines,
                         max_output_tokens=900).text
    notify.slack(f"Lost deals this week ({len(deals)}):\n{review}", channel="#sales")
    return {"lost": len(deals)}

FAQ

Common questions

Where does it get the reasons from?
From the closed-lost reason field on each deal and any notes on the deal record. The more detail your team writes there, the more useful the review.
What is a revival idea?
A suggested next step for a deal worth revisiting, for example checking back after the prospect's budget cycle or sharing a feature that has since shipped.
Does it change anything in HubSpot?
No. It only reads deals and posts a summary. Any follow-up tasks are created by your team.
What permissions does it need?
HubSpot deals read; Slack chat:write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it runs (weekly). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Review each week's lost HubSpot deals with AI in Slack” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.