Skip to content

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.

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 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

  1. Every Monday morning, ClickRuntime reads your open deals from HubSpot.

  2. It weights each deal by the probability of its stage and totals them by close month.

  3. It picks out deals that are overdue or have gone quiet, and AI can add a short commentary.

  4. 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

RunsWeekly
Get a weekly revenue forecast from HubSpot by emailtoday, 9:00Succeeded
Email · Pipeline forecastWeighted forecast: 182,400 across 37 open deals. At risk: Northwind renewal (24,000, due 12 Oct), Acme expansion (9,500, due 15 Oct).

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 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.
revenue_forecast_email_from_hubspot.pyexample
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?
Each open deal's amount is multiplied by its stage probability from your HubSpot pipeline settings, then added up by expected close month.
What counts as an at-risk deal?
By default, deals whose close date has passed or that have had no activity for 14 days. You can change both rules.
Does it work without AI?
Yes. The numbers and the at-risk list are worked out by simple rules. AI only adds the short commentary at the top, and the email is sent without it if AI isn't available.
What permissions does it need?
HubSpot deals read; Gmail gmail.send. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in 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 “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.