Integration
Connect Sanity to Blog Automation
Articles become documents in your Sanity dataset - with title, slug, Portable Text, cover image, tags and date. Drafts show up in Sanity Studio as drafts.
What you need for Sanity
- A Sanity project with Studio and a document type for articles (e.g.
post). - At least one document of that type - Blog Automation reads the fields from an existing document.
- Permission to create API tokens in the project.
Step by step: connect Sanity
- In Sanity Studio create a document of your article type (e.g. a test post with title, slug, text and image) and publish it.
- Open sanity.io/manage → your project → API → Tokens → Add API token with Editor permissions and copy the token.
- The project ID is shown at the top of the project; the dataset is usually called
production. - In Blog Automation: Websites & blogs → Connect website → Sanity. Enter project ID, dataset and token, then click Check connection.
- Choose the document type, check the field names, choose status and language and click Save.
Where do I find what in Sanity?
| Field in Blog Automation | Where to find it in Sanity |
|---|---|
| Project ID | sanity.io/manage → project, shown at the top. Lower-case letters and digits, e.g. abc12345. |
| Dataset | Usually production. |
| API token (Editor) | sanity.io/manage → API → Tokens, "Editor" permissions. Shown only once. |
What is transferred to Sanity?
Field names come from an existing document and can be edited by hand. Article text goes as Portable Text into a block field (or as HTML/Markdown into a string field), slug into a slug field, cover image into an image field (uploaded as an asset), tags into an array of strings.
Tips for Sanity
- Fields that are empty in the sample document are not detected - fill in the sample completely or type the names by hand.
Good to know about Sanity
- The schema lives in your Studio’s code; Blog Automation does not validate field names against it.
- Drafts are stored as
drafts.documents and published in Studio.
More in the official Sanity documentation (external link).
Frequently asked questions about Sanity
My document type is not offered.
There is no document of that type in the dataset yet. Create one in Studio and check again.
The check reports missing write permission.
The token needs the "Editor" role (not "Viewer"). Create a new token.
Similar platforms
Strapi
Articles become entries of a content type in Strapi 5 (self-hosted or Strapi Cloud).
Tested with a real accountRead the guideDirectus
Articles become items of a collection in Directus (self-hosted or Directus Cloud).
Tested with a real accountRead the guidePayload
Articles become documents of a collection in Payload CMS 3 (self-hosted).
Tested with a real accountRead the guideContentful
Articles become entries of a content type in your Contentful space.
Tested with a real accountRead the guideStoryblok
Articles become stories in your Storyblok space - with the story’s name, slug and tags, plus text, summary, image and date in the fields of your content type.
Tested with a real accountRead the guideDatoCMS
Articles become records of a model in your DatoCMS project - with title, slug, text, summary, cover image, SEO field and date.
Tested with a real accountRead the guide
Ready for your first post?
Try Blog Automation with sample data
The demo opens at once, no sign-up needed. You see the dashboard, editor, calendar and approval just the way your team will use them.
The demo shows sample texts. The Free plan includes 200 tokens a month.
