Skip to content

Daily

Close cold HubSpot deals and ask for feedback

Deals with no activity for three weeks are marked Closed Lost, the contact gets a short feedback email from Gmail, and the team sees a summary in Slack.

Runs
Daily
Apps
Gmail, HubSpot
AI
Not needed
Access
HubSpot deals+contacts read+write; Gmail gmail.send

Send this to your assistant

Create a ClickRuntime automation: every day, find HubSpot deals with no activity for 21 days, mark them Closed Lost, send the contact a short feedback request from my Gmail and post a summary to Slack.

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

Pipelines fill up with deals that died weeks ago. Nobody wants to close them, so forecasts look healthier than they are and reps keep scrolling past the same names. Meanwhile, the prospect never hears from you again and you never learn why they went quiet.

This tidies the pipeline every day by closing deals that have gone silent for three weeks and sends the contact a polite, low-pressure note asking what got in the way. Some reply with useful reasons, and a few come back to life.

What you get out of it

  • The pipeline reflects reality

    Dead deals leave the forecast, so the numbers your team works from are honest.

  • You learn why deals stall

    A short question to the contact often gets a one-line answer about price, timing or a competitor you can act on.

  • Some deals restart

    A friendly closing note gives a hesitant buyer an easy way to say they are still interested.

  • The team knows what was closed

    A Slack summary lists the deals closed that day, so owners aren't surprised.

How it works

What happens, step by step

  1. Once a day, ClickRuntime looks for open HubSpot deals with no activity for 21 days.

  2. It moves each one to Closed Lost and finds the deal's main contact.

  3. The contact gets a short feedback email from your Gmail address.

  4. A summary of the deals closed is posted to your Slack channel.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect HubSpot

What you get

RunsDaily
Close cold HubSpot deals and ask for feedbacktoday, 9:00Succeeded
Slack · #salesClosed 3 cold deals: Fabrikam pilot, Tailspin Toys annual plan, Adventure Works onboarding. Feedback emails sent to each contact.

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Gmail and HubSpot 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.
close_cold_deals_with_a_feedback_email.pyexample
import base64, time
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, notify
def hs(method, path, **kw):
    r = http.request(method, f"https://api.hubapi.com{path}", headers={"Authorization": f"Bearer {credentials.connection('hubspot', 'work')}"}, **kw)
    return r.raise_for_status() or (r.json() if r.content else {})
def send(to, subject, body):
    msg = EmailMessage(); msg["To"] = to; msg["Subject"] = subject; msg.set_content(body)
    build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()

@on_trigger
def run(event):
    cutoff = str(int((time.time() - 21 * 86400) * 1000))
    deals = hs("POST", "/crm/v3/objects/deals/search", json={"filterGroups": [{"filters": [{"propertyName": "hs_is_closed", "operator": "EQ", "value": "false"},
               {"propertyName": "notes_last_updated", "operator": "LT", "value": cutoff}]}], "properties": ["dealname"], "limit": 50})["results"]
    if not deals:
        return {"closed": 0}
    for d in deals:
        hs("PATCH", f"/crm/v3/objects/deals/{d['id']}", json={"properties": {"dealstage": "closedlost"}})
        for link in hs("GET", f"/crm/v4/objects/deals/{d['id']}/associations/contacts").get("results", [])[:1]:
            c = hs("GET", f"/crm/v3/objects/contacts/{link['toObjectId']}?properties=email,firstname")["properties"]
            send(c["email"], "Closing the loop", f"Hi {c.get('firstname') or 'there'},\n\nI'll stop following up for now. "
                 "Could you tell me in a line what got in the way? It really helps us.")
    names = [d["properties"]["dealname"] for d in deals]
    notify.slack(f"Closed {len(names)} cold deals: " + ", ".join(names), channel="#sales")
    return {"closed": len(names)}

FAQ

Common questions

What counts as no activity?
A deal whose last activity date in HubSpot is more than 21 days ago and which is still open. You can change the number of days or exclude certain pipelines.
What does the feedback email say?
You write it. A good one is two or three lines saying you'll stop following up and asking what got in the way, sent from your Gmail address.
Can I keep a deal open if it comes back?
Yes. If the contact replies, reopen the deal in HubSpot by changing its stage. It will only be closed again if it goes quiet for another 21 days.
What permissions does it need?
HubSpot deals+contacts read+write; Gmail gmail.send. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (daily). 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 “Close cold HubSpot deals and ask for feedback” from your assistant

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