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.
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
Once a day, ClickRuntime looks for open HubSpot deals with no activity for 21 days.
It moves each one to Closed Lost and finds the deal's main contact.
The contact gets a short feedback email from your Gmail address.
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
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
- 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
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?
What does the feedback email say?
Can I keep a deal open if it comes back?
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
Email new HubSpot contacts nobody has contacted yet
New contacts who haven't heard from you get an introduction email from your Gmail each day, and HubSpot records that they've been contacted.
See how it worksFollow up with HubSpot contacts who haven't replied
Contacts who didn't answer your first email get a polite follow-up from Gmail a few days later, and HubSpot shows it was sent.
See how it worksDraft personal outreach emails for a HubSpot list
Each contact in your HubSpot outreach list gets a tailored email waiting in your Gmail drafts, ready for you to check and send.
See how it worksKeep exploring
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.