The moment it happens
Announce published Sanity documents in Slack
When a post is published, your channel gets its title and document type within moments.
- Runs
- The moment it happens
- Apps
- Sanity
- AI
- Not needed
- Access
- Viewer token (webhook created by admin)
Send this to your assistant
Create a ClickRuntime automation: when a document of type post is published in my Sanity production dataset, post its title and type to #web-content in Slack.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
In a team using Sanity, editors publish and sometimes delete documents all day: product pages, blog posts, landing pages, legal notices. The people who need to know are often elsewhere. A marketer wants to share a new article, a developer needs to check that a deleted page does not break links, and a compliance reviewer wants to see every change to terms of service. Without a notification, they find out when a customer or a broken link reports it.
When a document is published or deleted in Sanity, a webhook delivers a projected payload with the fields you chose. The automation reads it and posts the title and document type to Slack. It reacts as soon as the event arrives. Content teams, developers and anyone responsible for what appears on a live site can follow publishing activity in one channel.
What you get out of it
Accidental deletions caught fast
A deleted document is announced with its title and type. If it was removed by mistake, an editor can restore it from history within minutes, before search engines or customers hit a missing page.
Marketing can promote new content
A new article appearing in a channel is an immediate prompt to share it on social media or in a newsletter. Launch timing stays tight because nobody has to ask 'is it live yet?'
Developers learn about structural changes
A new document type being published, or a page removed, can affect routes, sitemaps and builds. Developers who see the notice can check that front-end code and redirects still match the content.
An audit trail for sensitive pages
For terms, pricing and policy documents, the channel keeps a time-stamped record of publication. A compliance lead can scroll back to confirm when a change went live without asking an editor to remember.
Fewer status questions to editors
Colleagues stop messaging editors to ask whether a page is published. The channel answers that question, which leaves editors with more uninterrupted time to write and review. A producer who stops fielding 'is the pricing page live?' questions can finish a draft in one sitting.
How it works
What happens, step by step
When a document is published in Sanity, Sanity tells ClickRuntime straight away.
A message goes to your Slack channel with the document's title and type.
Each publish is posted once, so your team sees what went live as it happens.
Before it runs live
- Connect Sanity
- Paste your automation's link into the other app's webhook settings
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 Sanity steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, notify
@on_event
def handle(event):
doc = event.json or {}
if doc.get("_type") != "post":
return {"posted": False}
notify.slack(f"Published in Sanity: {doc.get('title', doc.get('_id'))} ({doc['_type']})", channel="#web-content")
return {"posted": True, "id": doc.get("_id")}FAQ
Common questions
Does it trigger on drafts being saved or only on publish?
What does the Slack message contain?
Do I need a particular Sanity plan to send webhooks?
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
Get a weekly count of published documents
Every Monday you see how many documents went out last week, broken down by type.
See how it worksExport your Sanity dataset every week
Each Sunday an export of your dataset is taken and you get an email confirming what it covers.
See how it worksPost new orders and sign-ups to Slack
When something happens in your shop, app or form, the details land in the right channel straight away.
See how it worksKeep exploring
Set up “Announce published Sanity documents in Slack” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.