Sanity CMS Setup
Connect Sanity CMS to Kreo Now for seamless AI content creation and publishing.
Last updated: 2026-07-22
Overview
Kreo Now's Sanity integration goes beyond simple API connectivity. It auto-detects your Sanity schema, maps fields intelligently, handles Portable Text conversion, and manages image uploads to your Sanity asset pipeline.
This guide walks you through connecting Kreo Now to your Sanity project and configuring the integration for optimal performance.
Prerequisites
- A Sanity project (create one at sanity.io/manage)
- Your Sanity Project ID and Dataset name
- A Sanity API token with appropriate permissions
Step-by-Step Guide
- Create a Sanity API Token:
Go to sanity.io/manage → Select your project → Settings → API → Tokens → Add API Token
Name your token (e.g., "Kreo Now Integration") and select the following permissions:- Read — Schemas, documents, datasets
- Write — Documents, assets
- Connect in Kreo Now:
Go to Integrations → Add Connection → Sanity - Enter your Project ID, Dataset name, and API Token
- Click Test Connection to verify everything works
- Click Save to complete the setup
Schema Detection
Once connected, Kreo Now automatically scans your Sanity project and detects your document schemas. Here's what happens:
- Kreo Now lists all your schema types
- You select which document type to publish to (e.g.,
post,article) - Kreo Now automatically maps fields based on naming conventions:
title→ Kreo Now post titleslug→ Auto-generated from titlebodyorcontent→ Main content (Portable Text)excerptordescription→ Meta descriptionmainImageorimage→ Featured image
Field Mapping Configuration
Kreo Now supports mapping to these Sanity field types:
| Sanity Type | Kreo Now Source | Auto-map Support |
|---|---|---|
string | Title, meta description | Yes |
text | Excerpt, summary | Yes |
block (Portable Text) | Full post content | Yes |
image | Featured/generated images | Yes |
slug | Auto-generated from title | Yes |
array | Tags, categories | Partial |
To customize field mappings, click Configure Field Mapping after connecting. You can map any Kreo Now field to any compatible Sanity field.
Publishing Behavior
Kreo Now gives you full control over the publishing workflow:
- Create Draft — Content is saved as a Sanity draft. You can review and publish from Sanity Studio later
- Publish Immediately — Content is published directly to your Sanity dataset
- Image Handling — Images generated by Kreo Now are uploaded to your Sanity assets pipeline automatically
- Draft Status — Kreo Now respects Sanity's draft/published status system
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Token permissions insufficient | API token missing read/write scopes | Regenerate the token with both read and write permissions |
| Schema not detected | No published schemas or incorrect project ID | Ensure at least one document type is published in Sanity. Verify project ID |
| Field mapping errors | Field names don't match conventions | Use the field mapping editor to manually map fields |
| Portable Text issues | Unsupported block types in content | Kreo Now supports standard blocks. Custom block types may need manual adjustment |