Skip to content

On a schedule

Find open deals with a past close date

Each weekday you see the open opportunities whose close date has passed, grouped by owner.

Runs
On a schedule
Apps
Salesforce
AI
Not needed
Access
api (read)

Send this to your assistant

Create a ClickRuntime automation: every weekday at 8am, email me open Salesforce opportunities with a close date in the past, grouped by owner.

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

Open opportunities with a close date in the past are one of the most common data-quality problems in Salesforce. A rep forgets to move a date after the buyer pushes the decision, and the deal now claims it should have closed three weeks ago. Forecast reports count it in the wrong period, weighted pipeline is overstated, and the quarter's number looks healthier than it is. Managers usually find these records only when someone builds a custom report, long after the damage is done.

On its schedule, the automation queries Salesforce for open opportunities whose CloseDate is earlier than today, groups them by owner, and emails you the list. Each rep's overdue deals appear together with amount and stage so you know who to ask. It runs without anyone opening a report. Sales managers and RevOps teams use it to keep forecast dates honest before the weekly review.

What you get out of it

  • Forecast numbers stay believable

    Deals with stale dates are surfaced before they distort period totals. Leadership then presents a forecast built on realistic close dates instead of one inflated by deals that quietly slipped.

  • Each rep sees only their own mess

    Grouping by owner makes follow-up simple: forward the relevant section to each rep. Nobody has to filter a 200-row report to find which of the overdue deals belong to them.

  • Dead deals get closed out

    Some overdue opportunities are really lost. A regular list prompts reps to mark them Closed Lost, which cleans the pipeline and makes win-rate figures accurate for the next planning cycle.

  • Slipping deals trigger a conversation

    A date that has passed is often the first sign of trouble. Seeing it in an email lets a manager ask what changed with the buyer while there is still time to rescue the deal.

  • A habit of pipeline hygiene forms

    Reps learn that stale dates are noticed every week. Over a few cycles the list gets shorter, and the team keeps CRM data current without a separate cleanup project. A rep with five overdue deals on Monday usually has one by the third week.

How it works

What happens, step by step

  1. Every weekday at 8 am, ClickRuntime finds open Salesforce opportunities whose close date has already passed.

  2. It groups them by owner.

  3. You get an email listing each owner's opportunities with their stage, amount and original close date.

Before it runs live

  • Connect Salesforce

What you get

RunsOn a schedule
Find open deals with a past close datetoday, 9:00Succeeded
Email · 7 opportunities past their close dateSam Carter - Northwind – Expansion · Proposal · $18,000 · was due 2026-10-10

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 Salesforce 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.
past_due_close_date_alert.pyexample
from collections import defaultdict
from clickruntime import on_trigger, credentials, http, notify

API = "https://yourcompany.my.salesforce.com/services/data/v61.0"

@on_trigger
def run(event):
    opps = http.get(f"{API}/query", headers={"Authorization": f"Bearer {credentials.connection('salesforce', 'work')}"},
                    params={"q": "SELECT Name, Amount, CloseDate, StageName, Owner.Name FROM Opportunity "
                                 "WHERE IsClosed = false AND CloseDate < TODAY ORDER BY CloseDate"}).json()["records"]
    if not opps:
        return {"past_due": 0}
    by_owner = defaultdict(list)
    for o in opps:
        by_owner[o["Owner"]["Name"]].append(f"  - {o['Name']} · {o['StageName']} · ${o['Amount'] or 0:,.0f} · was due {o['CloseDate']}")
    notify.email_me(f"{len(opps)} opportunities past their close date",
                    "\n\n".join(f"{owner}\n" + "\n".join(items) for owner, items in sorted(by_owner.items())))
    return {"past_due": len(opps)}

FAQ

Common questions

What counts as an open opportunity here?
An opportunity where IsClosed is false, meaning its stage is not Closed Won or Closed Lost. If your org uses custom stages that behave like closed ones, tell your AI assistant so the query treats them correctly.
Can I get the list only on Mondays?
Yes. The schedule is set when you create it, so you can pick Monday morning, daily, or any other rhythm. Weekly suits most teams, since reps need some time to fix dates between reminders. Monday morning is a popular choice because reps can fix dates before the pipeline call.
Does it change any dates in Salesforce?
No. It only reads records and emails a report. Changing close dates is a decision for the rep who knows the buyer's real timeline, so the automation leaves the data untouched. If you want dates corrected in bulk, say so, and the change is shown for you to approve.
What permissions does it need?
api (read). 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 (on a schedule). 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 “Find open deals with a past close date” from your assistant

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