Editorial Workflows
Model, run, and observe content workflows on the Content Lake: definitions, stages, activities, and effects, from editorial review to full automation.
Engine
The library that evaluates and commits Editorial Workflow instances.
Definitions and instances
A definition describes a process. An instance is one run of that process.
Stages and transitions
Stages mark where an instance is. Transitions define where it can move.
Fields
Fields carry the typed data belonging to a workflow instance.
Conditions
How workflow rules decide: GROQ conditions evaluated against the instance’s rendered scope, and named conditions that keep repeated rules in sync.
Operations
The write vocabulary: a small set of ops that mutate an instance’s fields and statuses, carried by actions and by effect completions.
Effects and runtimes
Why the engine queues side effects instead of running them, and where the runtime lives: the verbs your processes call to move workflows forward.
Guards and enforcement
Advisory checks guide the UI; guards are rules the Content Lake holds. How guards compile to locks, and how identity and grants fit in.
Activities and actions
What a stage’s work is made of: the two axes of an activity, the triggers and buttons that fire its actions, and the ops-then-effects shape of what every action does.
Subworkflows
How a large process composes out of smaller ones: an action spawns a child workflow per row of a query, and a trigger resolves the parent’s activity once they all settle.
Global document references
Why every document pointer in a workflow carries its location, and how resource aliases keep deployed definitions portable across environments.
The reactive session
How a UI drives a workflow live: watched documents feed evaluation as they change, previews are derived projections, and every change commits through the engine’s verbs.
Reference
Find the authoritative API and type reference for each Editorial Workflows domain. Exact contracts live at the bottom of the corresponding concept page.
Set up the workflow CLI
Install and configure the command-line tool that deploys and manages workflow definitions and the instances they run.
Set up the MCP server
Connect an AI agent to your workflows over MCP: an org token authenticates the server, and each tool call addresses the environment it acts on.
Set up the Studio plugin
Install the Editorial Workflows plugin for Sanity Studio and wire it into your config: the workflow strip, the Workflows view, and stage badges.
Build a workflow UI
Consume the reactive session from the App SDK: evaluation, insights, and preview values for your own workflow UI.
Test your workflows
Run the real workflow engine in memory: drive every path of a workflow, control the clock, simulate guard enforcement, and assert on exactly what happens.
Cookbook
Worked, runnable workflow examples for Sanity: editorial review, AI content pipelines, coordinated releases, and more, each a complete definition.
Cookbook: Editorial review
A four-stage editorial review workflow for Sanity: assignment, drafting, review, and published, driven by human actions in the Studio.
Cookbook: AI content pipeline
An AI content pipeline built on Editorial Workflows: effect handlers call generation APIs while editors approve results through workflow actions.
Cookbook: Coordinated release
A release workflow that coordinates approvals across many documents and hands the atomic go-live to a Content Release.

