Browse Integrations
You can connect Sanity to MorningAI in about five minutes using an API token: create a token in Sanity, then paste it with your Project ID and blog document type in DNA → CMS & Blog → Sanity → Connect. Posts you write in MorningAI publish as real documents in your configured type, mapped to your schema. Your token is stored securely and used only for your configured project, and you can revoke access instantly from Sanity's dashboard anytime.
Why Connect Sanity to MorningAI
Writing a blog post in MorningAI and then reformatting it for your CMS is slow and error-prone. Fields get missed, Portable Text breaks, and scheduling the blog separately from the social posts that promote it creates coordination gaps.
When you connect Sanity to MorningAI, you close the loop from draft to live site. Publish blog posts to Sanity with AI, schedule them from the same calendar as your social posts, and unpublish when needed. MorningAI introspects your schema so posts land with the right fields for your document type, not a generic blob.
How to Connect Sanity (Step by Step)
- In Sanity, go to Manage → API → Tokens → Add token with Editor (write) permissions. Copy the token.
- In MorningAI, go to DNA → CMS & Blog → Sanity → Connect.
- Paste the token, your Project ID, dataset (optional), and the document type your blog posts use (for example,
postorblogPost). - Done. MorningAI reads your schema in the background so published posts land with the right fields.
You can find your Project ID in Sanity's project settings. Your document type is the schema name your blog posts use in Sanity Studio (common examples: post, blogPost, article).
For tighter control, create a dedicated token for MorningAI. For stricter setups, you can also use a dedicated dataset so access is exactly as narrow as you want.
What the Connection Unlocks
With Sanity connected, MorningAI handles blog publishing end to end:
- Publish blog posts directly into Sanity as real documents of your configured type.
- Schema-aware field mapping for title, slug, excerpt, body (converted to Portable Text), categories, SEO metadata, featured image (uploaded as a proper Sanity asset), author, publish date, and custom fields from your introspected schema.
- Schedule publishing from the same calendar as your social posts. Write now, set a date, and MorningAI publishes to Sanity on time.
- Unpublish from MorningAI when you need to pull a post down.
What this feels like: draft the post in MorningAI's blog editor, pick Sanity as the destination, schedule it, and it appears on your site as if an editor had entered it by hand.
This is blog publishing in one direction (MorningAI to Sanity) for your configured document type. It is not general CMS sync, and edits made in Sanity Studio do not flow back into MorningAI.
What MorningAI Can and Can't Do
| MorningAI can | MorningAI can't |
|---|---|
| Publish blog posts of your configured document type to Sanity | Edit or read your existing Sanity content beyond the blog workflow |
| Map fields to your schema (Portable Text, SEO, featured image, custom fields) | Sync your full CMS or migrate multiple document types |
| Schedule and unpublish blog posts from MorningAI | Publish to WordPress, Webflow, or Shopify blogs |
| Use your token only for the project and dataset you specify | Push two-way edits back from Sanity Studio into MorningAI |
Your Data, Your Control
The token you provide is used only for the blog publishing workflow, in the project and dataset you specify. MorningAI writes posts of your configured document type, plus supporting author and category references when needed. It does not touch the rest of your content.
We recommend a dedicated token for MorningAI so access is exactly as narrow as you want. Sanity shows token usage in its own dashboard, so you can monitor activity on the Sanity side.
Your token is stored securely and used only for your configured project. To revoke access, delete the token in Sanity's dashboard. Access ends instantly, regardless of anything on our side. For broader context on how MorningAI handles data, see our security page.
Real-World Use Cases
Launch day coordination: Write the blog post, schedule it in MorningAI, and schedule the social posts that promote it on the same calendar so everything goes live together.
Schema-native publishing: Publish with Portable Text body, SEO metadata, featured image as a real Sanity asset, and your custom fields mapped automatically from your introspected schema.
Clean takedowns: Unpublish a post from MorningAI when a campaign ends or content needs to come down, without opening Sanity Studio for a manual change.
Frequently Asked Questions
Is it safe to give MorningAI a Sanity API token?
Yes, when you scope it deliberately. The token is used only for the blog publishing workflow in the project and dataset you specify. We recommend a dedicated token, and Sanity shows token usage in its own dashboard. Your token is stored securely and used only for your configured project.
Can MorningAI edit my existing Sanity content?
No. Publishing blog posts of your configured document type is the whole surface. MorningAI does not read or edit your existing Sanity content beyond that blog workflow.
How do I revoke MorningAI's access to Sanity?
Delete the token in Sanity's dashboard. Access ends instantly.
Next Steps
Sanity closes the blog loop from MorningAI to your site. Next, learn how to schedule content on the calendar alongside your social posts, or connect Google Search Console to ask what is ranking once your posts go live.