I Turned Sanity Into a Social Content Operating System That Publishes to Instagram A developer built Sanity Social, a social content operating system for agencies that runs as a Sanity App SDK application inside the Sanity Dashboard and manages the full lifecycle of social content — client brand guidelines, campaigns, AI-assisted drafting, editorial review, approval, scheduling and publishing. The system uses Sanity Workflows and Functions to orchestrate an Idea → Draft → Internal Review → Client Review → Approved → Instagram pipeline, with AI caption drafts and an assistant powered by Sanity Content Agent that read structured brand and campaign context but never approve or publish. The developer connected a real Instagram Business account via Meta OAuth and successfully published an approved post from the app directly to Instagram, with secrets confined to a small Next.js backend. This is a submission for the Sanity Challenge, Path Two: Vibe-Code Something Strange https://dev.to/challenges/sanity-2026-09-16 I built Sanity Social, a social content operating system for agencies. Instead of using Sanity only as a CMS, I used it to manage the complete lifecycle of social content: client brand guidelines, campaigns, AI-assisted drafting, editorial review, approval, scheduling, and finally publishing directly to Instagram. A post moves through: Idea → Draft → Internal Review → Client Review → Approved → Instagram The final version isn't a mock integration. I connected a real Instagram Business account through Meta OAuth and successfully published an approved post from the Sanity application directly to Instagram. An agency workspace for planning, approving, scheduling and publishing social content, built as a Sanity App SDK https://www.sanity.io/docs/app-sdk application. It runs inside the Sanity Dashboard, uses Sanity UI and the Content Lake for all content and workflow state, and publishes to Instagram through a small Next.js backend that is the only place secrets live. Sanity models the whole editorial process here, not just the posts: client → brand guidelines → campaign → social post → review workflow Sanity Workflows https://www.sanity.io/docs/workflows → human approval → publishing to Instagram, orchestrated by Sanity Functions. AI caption drafts and an assistant run on Sanity Content Agent https://www.sanity.io/docs/content-agent and read the structured brand and campaign context. AI never approves or publishes anything. Built for the DEV + Sanity Challenge 2026, Path Two "Vibe-Code Something Strange" , with Claude Code. | Sanity project | 8btwn23g , dataset production | | App Sanity Dashboard | "Social Studio" App SDK | I built the project with Claude Code, using it as an implementation partner rather than a one-shot code generator. The initial idea was simple: turn Sanity into a social content operating system for agencies, with structured client data, brand guidelines, campaigns, review states, AI-assisted drafting, and Instagram publishing. One early direction was to turn the whole project into a full multi-tenant SaaS with custom authentication, tenant provisioning and Supabase RLS. That architecture still makes sense commercially, but it was too large for the challenge and distracted from the most interesting Sanity features. So I changed direction and focused on a deeper Sanity-native experience using App SDK, Workflows, structured content and external API publishing. The final editorial flow became: Idea → Draft → Internal Review → Client Review → Approved → Instagram Claude Code helped implement the custom App SDK interface, schemas, workflow synchronization, Instagram OAuth, encrypted token storage, publishing validation, duplicate-publish protection, AI drafting and tests. Where things got interesting Not everything worked on the first attempt. The Content Agent integration looked correct locally but failed against the real API until I deployed the required Studio and fixed issues that only appeared in production. Instagram was the biggest reality check. Mock publishing worked, but I wanted the submission to prove a real end-to-end flow. That meant configuring Meta OAuth, Instagram professional account access, Supabase, secure token storage and the deployed backend. At one point the Sanity App reported “Backend unavailable” even though the backend health endpoint was fully healthy. That led to another debugging pass around the frontend/backend connection instead of assuming the deployment itself was broken. The final test was real: I connected the @1367.studio Instagram Business account and successfully published an approved post from Social Studio directly to Instagram. AI and structured content I also wanted the AI feature to use Sanity for more than simple storage. “Draft with AI” reads structured context including: Sanity Project ID: 8btwn23g Dataset: production The project uses structured documents for: Sanity schemas: