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.
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
Every five minutes, the automation checks Salesforce for opportunities that moved to Closed Won since the last check.
It skips any deal it has already announced.
Each win is posted to your Slack channel with the opportunity name, amount and owner.
Before it runs live
- Connect Salesforce
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
- 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
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?
Can I post only deals over a certain amount?
Which Salesforce permissions are needed?
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
Post new Salesforce opportunities to Slack
Each new opportunity shows up in Slack with its amount and close date within minutes.
See how it worksPost new Salesforce leads to Slack
Your team sees each new lead's name, company and source in Slack within minutes.
See how it worksFill in new Salesforce accounts from their website
New accounts get industry, employee range and a short description filled in from their homepage.
See how it worksKeep exploring
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.