Publish Once, Post Everywhere
Write once in Studio. Post everywhere. No copy-paste, no platform hopping.
Automate your content workflows with functions that trigger on document events. From AI-powered automatic tagging and content enrichment to translation and optimization, these pre-built functions save time and improve content quality across your Sanity projects.
Write once in Studio. Post everywhere. No copy-paste, no platform hopping.
Automatically format code blocks using Prettier to enforce consistency across all documents.
Automatically generate accessible, multilingual alt text for images in your Sanity Media Library using Agent Actions and Sanity Functions
AI-powered automatic tagging for Sanity blog posts that analyzes content to generate 3 relevant tags, maintaining consistency by reusing existing tags from your content library.
Automatically track when content was first published with a timestamp that sets once and never overwrites, providing reliable publication history for analytics and editorial workflows.
Automatically update your Algolia index
Create, preview, and send Klaviyo campaigns without ever leaving Sanity Studio"
A Sanity function that tracks slug changes and creates redirects automatically.
Stop manually linking products. Let this function map relationships for you
Surface product age to help editors choose the freshest inventory
Automatically analyze and categorize the emotional tone of user comments
On document publish, send a Slack notification so your team is informed
AI-Powered Content Summary from Long Form Content
Get instant Telegram notifications when new comments are posted, with direct links to your Sanity Studio.
AI-Powered Tone Analysis for Consistent Brand Voice
Generate content changes for a piece of content
Inform your the Bluesky crowd when you publish a post
Spread the word on Mastodon when publishing a blog post
Populate your list options in a string schema using an external API
Use the renderDefault function to easily control your available array options.
This is a quick tip on how to truncate a Sanity block field to create an excerpt using GROQ.
Order by last name
Simple custom validation that force array length according to another field.
Uses @sanity/asset-utils to validate an uploaded image by its ID
Prevent references to large files to reduce the chances of high bandwidth usage
Suppose you have an Array Reference to Category and you want to get all posts with one of the categories listed in the current post. This is usually when you need to get related items.
A short snippet to filter category, tags or other document based on total referenced count.
Sometimes you want to validate items in an array, here is how
Manage Meta tags, openGraph, and locale Data for your site within Sanity Studio
After the approval (switch to true), the date of this operation is stored in a hidden field.
Snippet for `internalLInk` Reference in GROQ and rendering it in React/Next.js frontend using Portabletext.
Fetch content from the base locale regardless of whether the current document is the base or translation document
Using webhooks and the Sanity API, you can merge content changes and user information
We can turn off validation for fields using the same logic we use to hide them
Custom input component with a DIY webhook for connecting to APIs beyond publish, update, and delete events.
Internal/External link based on the conditional field example with Next.js component starters