Sanity Tasks with an AI Assistant

Use AI with Sanity to query Content Lake documents, read current versions and apply explicit mutation transactions.

What to Ask Leina to Do with Sanity

Copy a prompt, add your details, and send it to Leina in your connected team chat.

Run a scoped GROQ query and read selected current documents by ID.

Query dataset [dataset] with GROQ [query], then get document IDs [IDs] and summarize their content.

Run an explicit mutation transaction in dry-run mode.

Preview mutations [JSON] in dataset [dataset] using dryRun true, and explain the returned result.

Get Started with Sanity

  1. Connect Your Account

    Provide a Sanity robot or personal API token and Project ID.

  2. Try a Task

    Tell Leina what you need in your team chat. Include the source, destination, and expected result.

    Set Up Leina in Your Chat →
  3. Check the Result

    Review the result and any changes in the connected app.

Supported Sanity Capabilities

Use AI with Sanity to query Content Lake documents, read current versions and apply explicit mutation transactions.

Research CMS Documents

Run a scoped GROQ query and read selected current documents by ID.

Preview a Mutation Transaction

Run an explicit mutation transaction in dry-run mode.

View All 3 Actions
  • Query Documents
  • Get Documents
  • Mutate Documents

Visit Provider Website ↗

Frequently Asked Questions

Can I preview mutations first?

Yes. Set dryRun true when submitting the mutation transaction.

Does document lookup use the query cache?

get_documents retrieves latest documents by ID while bypassing the query cache.

What should I specify in my request?

Specify dataset and GROQ query or mutations. Mutation transactions can change or delete documents; dryRun previews the transaction without applying it.

Your AI employee for Sanity

Tell Leina what you need in your team chat. Include the source, destination, and expected result.