Weekly
Log a weekly HubSpot revenue forecast in a sheet
Every Monday your weighted pipeline forecast is added to your Forecast sheet and you get an email with the highlights.
- Runs
- Weekly
- Apps
- Google Sheets, HubSpot
- AI
- Optional
- Access
- HubSpot deals read; Sheets edit
Send this to your assistant
Create a ClickRuntime automation: every Monday, pull my open HubSpot deals with amount, stage and close date, work out a weighted forecast, add it to my 'Forecast' sheet and email me the highlights.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Finance and leadership want a forecast they can track over time, not a HubSpot dashboard that only shows today. Someone in sales ops exports deals each week, multiplies by stage probabilities in a spreadsheet and emails a summary, and if they're away, it doesn't happen.
This works out the weighted forecast from your open deals every Monday, appends it to a Forecast sheet so the history builds up week by week, and emails you the headline with an optional AI note on what moved.
What you get out of it
A forecast history you can chart
One row per week shows how the forecast has moved across the quarter.
Uses your own stage probabilities
Weights come from your HubSpot pipeline settings, so the sheet matches what sales sees.
Highlights in your inbox
The email gives the total, this month's expected close and the biggest deals, so you don't need to open the sheet.
Commentary if you want it
AI can add two or three sentences on what changed since last week; without AI, the numbers still arrive.
How it works
What happens, step by step
Every Monday morning, ClickRuntime reads your open HubSpot deals and your pipeline stage probabilities.
It weights each deal by its stage and adds up the totals, including what's expected this month.
It adds a row with the week's figures to your Forecast sheet.
You get an email with the highlights, with a short AI commentary if you've chosen one.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- 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 Google Sheets and HubSpot steps into one automation
Under the hood
The code that runs this automation
from datetime import date
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai, notify
SHEET_ID = "1AbCdEfGhIjKlMnOpQrStUvWxYz"
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 = [d["properties"] for d in hs("POST", "/crm/v3/objects/deals/search", json={"filterGroups": [{"filters": [{"propertyName": "hs_is_closed", "operator": "EQ", "value": "false"}]}],
"properties": ["amount", "dealstage", "closedate"], "limit": 200})["results"]]
w = lambda p: float(p.get("amount") or 0) * probs.get(p["dealstage"], 0)
month = date.today().isoformat()[:7]
total = sum(float(p.get("amount") or 0) for p in deals)
weighted = sum(w(p) for p in deals)
this_month = sum(w(p) for p in deals if (p.get("closedate") or "").startswith(month))
row = [date.today().isoformat(), len(deals), round(total), round(weighted), round(this_month)]
build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets().values().append(
spreadsheetId=SHEET_ID, range="Forecast!A1", valueInputOption="RAW", body={"values": [row]}).execute()
text = f"Open deals: {row[1]}\nPipeline: {row[2]:,}\nWeighted forecast: {row[3]:,}\nExpected this month: {row[4]:,}"
try:
text += "\n\n" + ai.generate("Two sentences of commentary on this sales forecast:\n" + text, max_output_tokens=120).text
except ai.AIError:
pass
notify.email_me(f"Forecast for week of {row[0]}", text)
return {"weighted": row[3]}FAQ
Common questions
What goes in each row?
Can it cover more than one pipeline?
Can the summary go to Slack too?
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
Track weekly HubSpot lifecycle numbers in a sheet
Every Monday a new row in your Pipeline metrics sheet shows how many contacts reached each lifecycle stage last week, split by source.
See how it worksFlag stalled HubSpot deals with a suggested follow-up
Each weekday, deals that have gone quiet for two weeks are listed in your Stalled deals sheet with a suggested follow-up, and owners get a Slack nudge.
See how it worksScore inbound leads, add them to HubSpot and log them in a sheet
Each form lead is scored, created in HubSpot with that score, added to your Leads sheet, and the hot ones are posted to Slack.
See how it worksKeep exploring
Set up “Log a weekly HubSpot revenue forecast in a sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.