Sanity · Arazzo Workflow
Sanity Query Then Patch Document
Version 1.0.0
Find a document with GROQ, then patch it when a match is found.
View Spec
View on GitHub
Headless CMSContent ManagementGROQReal-TimeStructured ContentDeveloper PlatformArazzoWorkflows
Provider
Workflows
query-then-patch-document
Locate a document by a GROQ filter and patch it if it exists.
Issues a GROQ query that returns the first document matching the filter, then conditionally applies a set patch to that document's id when a match is present.
1
findDocument
queryDocumentsPost
Run a GROQ query that returns the id of the first document matching the supplied filter expression.
2
patchDocument
mutateDocuments
Apply a patch mutation that sets the supplied fields on the matched document id.
Source API Descriptions
Arazzo Workflow Specification
Work with this as data
Every workflow here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for arazzo workflows
4 MCP tools reach this
find_arazzoBrowse and filter every workflow in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/sanity-query-then-patch-document-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.