Weekly
Get a weekly revenue forecast from HubSpot by email
Every Monday you get an email with your weighted pipeline forecast and the deals most at risk.
- Runs
- Weekly
- Apps
- Gmail, HubSpot
- AI
- Optional
- Access
- HubSpot deals read; Gmail gmail.send
Send this to your assistant
Create a ClickRuntime automation: every Monday, email me a forecast from my open HubSpot deals weighted by stage, and list the deals that look at risk.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A founder or sales lead wants to know on Monday morning how the quarter is shaping up. HubSpot has the numbers, but getting a weighted forecast means building a report, exporting it or asking someone to put it together, and the deals that need attention are buried in the list.
This adds up your open deals weighted by stage each Monday and sends the total, the split by month and the deals that look at risk to your Gmail. If you want, AI adds a short paragraph on what changed and what to look at first.
What you get out of it
The forecast is in your inbox before your first meeting
No report to build or export; the number is waiting on Monday morning.
Weighted by stage, not wishful
Each deal counts by the probability of its stage, so the total reflects what is likely to close.
Risky deals are named
Deals past their close date or untouched for weeks are listed, so you know who to chase.
A short read on what it means
Optional AI commentary points out the biggest movers and where the quarter is exposed.
How it works
What happens, step by step
Every Monday morning, ClickRuntime reads your open deals from HubSpot.
It weights each deal by the probability of its stage and totals them by close month.
It picks out deals that are overdue or have gone quiet, and AI can add a short commentary.
The forecast is emailed to you from your Gmail address.
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
- 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 Gmail and HubSpot steps into one automation
Under the hood
The code that runs this automation
import base64
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import date
from clickruntime import on_trigger, credentials, http, ai
ME = "you@contoso.example"
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 {})
@on_trigger
def run(event):
probs = {s["id"]: float(s["metadata"].get("probability", 0)) for p in hs("GET", "/crm/v3/pipelines/deals")["results"] for s in p["stages"]}
deals = hs("POST", "/crm/v3/objects/deals/search", json={"filterGroups": [{"filters": [{"propertyName": "hs_is_closed", "operator": "EQ", "value": "false"}]}],
"properties": ["dealname", "amount", "dealstage", "closedate"], "limit": 200})["results"]
total, risky = 0.0, []
for d in deals:
p = d["properties"]
total += float(p.get("amount") or 0) * probs.get(p["dealstage"], 0)
if p.get("closedate") and p["closedate"][:10] < date.today().isoformat():
risky.append(f"{p['dealname']} ({p.get('amount')}, due {p['closedate'][:10]})")
text = f"Weighted forecast: {total:,.0f}\nOpen deals: {len(deals)}\n\nAt risk:\n" + "\n".join(risky[:15])
try:
text = ai.generate("Write 3 sentences of commentary on this pipeline:\n" + text, max_output_tokens=200).text + "\n\n" + text
except (ai.AINotIncluded, ai.AILimitReached):
pass
msg = EmailMessage(); msg["To"] = ME; msg["Subject"] = f"Pipeline forecast, week of {date.today()}"; msg.set_content(text)
g = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
g.users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
return {"forecast": round(total), "at_risk": len(risky)}FAQ
Common questions
How is the forecast weighted?
What counts as an at-risk deal?
Does it work without AI?
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
Draft 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 worksEmail 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 worksKeep exploring
Set up “Get a weekly revenue forecast from HubSpot by email” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.