Skip to content

Every 5 minutes

Tell your team in Slack when you win a deal

Every opportunity that moves to Closed Won is posted to Slack with its name, amount and owner.

Runs
Every 5 minutes
Apps
Salesforce
AI
Not needed
Access
api, refresh_token (read)

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, check for Salesforce opportunities that moved to Closed Won and post each one to #wins in Slack with the name, amount and 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

A salesperson closes a deal and updates the opportunity in Salesforce, and then nothing happens. The rest of the company learns about it in a weekly meeting or a monthly report. Customer success has no one to start onboarding, finance has not seen the contract, and the rep who worked months for the deal gets no recognition at the moment it matters.

Every 5 minutes, ClickRuntime runs a SOQL query for Opportunities with StageName equal to Closed Won that were modified since the last check, skips any IDs it has already announced, and posts each new win to Slack with the account, the amount and the owner. Updates to old wins do not repeat.

It suits sales teams and leadership who want wins to be seen as they happen, and who want handoffs to start immediately.

What you get out of it

  • Wins are celebrated while they are fresh

    A message in the team channel within minutes of closing gives the rep recognition and the team a lift. Praise a week later never has the same effect. Momentum in a sales team is partly social.

  • Handoffs begin at once

    Customer success, support and finance can start preparing the moment a deal closes. Delays between signing and kickoff cost goodwill with a customer who is waiting. Every day of delay is a day the customer waits.

  • Leadership sees pipeline turning to revenue

    Executives follow actual deals closing, not just forecasts. A feed of wins gives a feeling for momentum and helps with decisions about hiring and spending. Forecasts become real only when a deal closes.

  • Amounts and owners are in the post

    Seeing the account name, deal size and owner tells the team how significant the win is. A large enterprise contract is treated differently from a small renewal. Context decides who responds and how.

  • No deal is announced twice

    Saved opportunity IDs prevent repeats when a closed deal is edited afterward. The channel stays clean, so people continue to read it. Edits after closing are common and should stay quiet.

How it works

What happens, step by step

  1. Every five minutes, the automation checks Salesforce for opportunities that moved to Closed Won since the last check.

  2. It skips any deal it has already announced.

  3. Each win is posted to your Slack channel with the opportunity name, amount and owner.

Before it runs live

  • Connect Salesforce

What you get

RunsEvery 5 minutes
Tell your team in Slack when you win a dealtoday, 9:00Succeeded
Slack · #wins:tada: Closed Won: Northwind – Enterprise · $42,000 · Sam Carter

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

  • Act only on the items that match your own rules, and skip the rest
  • 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.
closed_won_deal_alert.pyexample
from clickruntime import on_trigger, credentials, http, state, notify, report_fetched

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

@on_trigger
def run(event):
    since = state.get("since") or "2026-01-01T00:00:00Z"
    opps = http.get(f"{API}/query", headers={"Authorization": f"Bearer {credentials.connection('salesforce', 'work')}"},
                    params={"q": "SELECT Id, Name, Amount, Owner.Name, LastModifiedDate FROM Opportunity "
                                 f"WHERE StageName = 'Closed Won' AND LastModifiedDate > {since} ORDER BY LastModifiedDate"}).json()["records"]
    seen = set(state.get("seen") or [])
    new = [o for o in opps if o["Id"] not in seen]
    report_fetched(len(new))
    if not new:
        return {"posted": 0}
    for o in new:
        notify.slack(f":tada: Closed Won: {o['Name']} · ${o['Amount'] or 0:,.0f} · {o['Owner']['Name']}", channel="#wins")
    state.set("seen", sorted(seen | {o["Id"] for o in new})[-500:])
    state.set("since", opps[-1]["LastModifiedDate"].replace(".000+0000", "Z"))
    return {"posted": len(new)}

FAQ

Common questions

What does LastModifiedDate do in the query?
It limits results to opportunities changed since the previous run, so each check is small and fast. Combined with StageName equal to Closed Won, it finds deals that were closed recently, even if they were edited a moment ago.
Can I post only deals over a certain amount?
Yes. The query can add a filter on the Amount field, such as above 10,000, so only large wins go to the main channel. Smaller deals can be sent to a different channel or left out completely.
Which Salesforce permissions are needed?
The connected user needs API access and read permission on the Opportunity object and the fields shown, such as Name, Amount, Account and Owner. Salesforce editions without API access, like some lower tiers, cannot use this approach.
What permissions does it need?
api, refresh_token (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 checks. Checks that find nothing new 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 “Tell your team in Slack when you win a deal” from your assistant

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