Skip to main content
AI Visibility4 min read

Connect Sanity to Cituna and publish to your Studio

Publish AI-written articles to Sanity as drafts or live documents: the Editor token, how Cituna learns your fields, and how Studio edits are kept.

Updated

If your blog lives in a Sanity Studio, Cituna can write straight into it. It finds the questions buyers ask that AI engines answer without you, writes the articles from your own search data, and creates each one as a document of your posts’ type, so your site renders it with the template it already has. Studios differ, so Cituna reads a few of your existing posts to learn which field holds the title, the slug, the body, the main image and the SEO fields, and you can correct anything it got wrong. Articles arrive as drafts until you choose otherwise. If your posts live somewhere other than Sanity, the webhook destination hands you the article to place yourself.

What this assumes

Your site reads its posts from a Sanity dataset. Cituna creates and updates documents of one type, the one your blog lists, and never touches pages, products or anything else in the dataset.

1. Find your project ID and dataset

At sanity.io/manage, open the project. Its project ID is on the overview, and the same ID and dataset name sit in your Studio’s sanity.config file. Most projects publish from the production dataset.

2. Create a token with Editor permissions

In the project’s API settings, open Tokens and add a token named Cituna with Editor permissions. Sanity shows it once, so copy it before you close the dialog.

Editor lets Cituna create drafts and publish them. A Viewer token can read but not write, and an Administrator token could change your project’s members and settings, which a publishing integration has no need for.

A token without write access is refused at connect with a message saying so, rather than failing later on the first article.

3. Connect the project in Cituna

Open Integrations → Sanity and paste the project ID, the dataset, the token and the public address your posts live under, such as https://example.com/blog. That address must be on the brand’s own website: it is how links between articles point at the live page.

Cituna checks the token, finds the document type your posts use and proves it may write with a dry run that saves nothing. If several types could be your blog, it asks you to choose rather than guessing.

4. Check the field mapping

Under Edit fields, the card shows which field receives the title, slug, body, main image, date, summary and SEO fields. Nested fields take a dot, such as seo.metaTitle. A field left empty is never written.

The body goes in as Portable Text by default, with headings, lists and links intact. If your schema stores the body as Markdown or HTML text instead, pick that format and Cituna sends it that way.

With no posts to learn from yet, the mapping starts from the fields of Sanity’s own blog template. Check it before the first article.

5. Choose drafts or publishing, then turn the daily article on

In Articles, pick the Sanity tile and choose a publishing workflow. Review in Cituna holds the editable article until you approve it. Send as a destination draft creates a Sanity draft, so it waits in the Studio until someone presses Publish. Publish automatically publishes the document as it is written.

Then switch on the daily article. Connecting a destination does not start anything by itself.

Troubleshooting

The article is in the Studio but not on my site.

It is still a draft, which is the default for review, or your site lists a different document type. Publish it in the Studio, or open Edit fields and set the type your blog actually queries.

Will Cituna overwrite an edit made in the Studio?

Not silently. Before an update, Cituna compares the fields it writes with what it last sent. If someone changed them in the Studio, it stops and asks before replacing them. Fields it does not write, such as author and categories, are never touched.

Does sending the same article twice create a duplicate?

No. Each article has a fixed document ID built from its slug, so a retry or a resend updates the same document rather than adding a second one.

My post type has no image field.

Then Cituna does not make a hero image for it at all, rather than generating one with nowhere to go. Add an image field to the schema and pick it under Edit fields if you want one.

Drafted with AI assistance from our own research and Search Console data, and reviewed by Rahul A before publishing. Rules and prices change; check the linked official source before you act.

Find your next AI visibility fix with Cituna

Cituna asks ChatGPT, Perplexity, Gemini, Claude, Grok, Google AI Overviews and Google AI Mode your buyers' questions every day, writes the fix for every answer you are missing from, and publishes new articles to your site. Run all of it from Claude or any AI agent.

Start free trial

3-day free trial · Card required, cancel anytime · Plans from $39 a month

Check crawler readiness free