Introducing GROQ-powered Webhooks
Blog post from Sanity
Sanity has introduced a new GROQ-powered Webhooks system that enhances data synchronization and customization for users needing to send data to external systems. Unlike traditional webhooks, this system offers unprecedented granularity and control, allowing users to specify triggers at the document, field, or query level using Sanity's unique query language, GROQ. This empowers users to filter and shape the data sent in webhook payloads, making it possible to trigger webhooks based on specific changes, such as a price decrease in a product document. The system's key features, Filters and Projections, enable users to precisely define the conditions under which webhooks are triggered and customize the data included in the webhook payload. Additional improvements include a new user interface, the ability to edit webhooks after creation, and enhanced metadata and authentication features. The system is designed to ensure reliable data delivery with retry mechanisms and rate-limiting, and it supports a wide range of use cases by integrating seamlessly with Sanity's platform for structured content. The previous webhook system is set for deprecation, and users are encouraged to transition to this more powerful and flexible solution.