Studio plugin uploads use
sanity-plugin/{projectId}/{dataset}/…; automation imports on this page use sanity/{projectId}/{dataset}/…. Both use stamped segment keys sanity.k.* in the JSON file but different workspace connections: Sanity Studio plugin (OAuth from Studio) versus Sanity here (WorkOS Pipes for automations).
Connect Sanity
- Open workspace Integrations and find Sanity (document automation / Pipes), then choose Connect. This is not the Sanity Studio plugin row used for the Studio inspector.
- Under Authentication method, choose OAuth (recommended) and select Authorize with Sanity, or choose API token, paste a token, and select Save token. Tokens need Editor access or higher for draft write-back.
- Confirm the connection shows as connected. Reauthorize or paste a new token if Platform asks you to.
Prepare the native project
Create or choose a native project, then set source and target locales under project Settings → Locales. Translation jobs, import, and push only use tags in that list: onesourceLocale and one or more targetLocales (the source locale cannot be a target). The Studio plugin loads the same list from the session API after you pick a project; see Project locales list.
Use locale tags from the native project list on the Sanity side. Document language fields, Locales collection tag values, and automation locale mappings should match those project tags. Exact tags match first. Language-only aliases such as en ↔ en-US are supported when only one regional form is present, but en is not en-US and zh-CN is not zh-TW. Do not add Sanity-only languages that are not configured as targets on the native project.
After you select a project and dataset in the automation editor, Platform loads languages from your Sanity Locales collection when present (locale documents with a tag field, as used by @sanity/document-internationalization and sanity-plugin-internationalized-array). If that collection is missing, Platform infers tags from existing content. Map each inferred tag onto a locale in the project’s sourceLocale / targetLocales list; drop or add project targets in Hyperlocalise when Sanity and the project list diverge.
Studio config files that hardcode supportedLanguages are not readable over the API; keep that array aligned with the project target list (the plugin shows only the intersection). A shared Locales collection keeps Studio and Hyperlocalise aligned. Scope slug uniqueness by language in Studio when translated documents share slug values.
Create the automation
- Open workspace Automations and select New Automation.
- Apply the Translate Sanity documents template, or add that skill from Add Skill.
- Attach the native project.
- Choose a scheduled or manual trigger. A schedule imports changed documents. It does not push translations.
- Under Sanity documents, set:
- Sanity project and dataset
- Document types to import
- Sanity source locale (must match the native project
sourceLocaleor an allowed alias) - Include draft documents on import (on by default)
- Existing Sanity translations: Only empty locales (default), Refresh imported locales, or Overwrite all locales
- Overwrite Sanity drafts when remote target is newer (on by default)
- Save the automation.
Import documents
Run now or wait for the schedule. Import writes one JSON source file per document undersanity/{projectId}/{dataset}/{documentType}/…. Review those files in the project like other source files.
Import does not write translations to Sanity.
Review and push drafts
- Translate and approve every visible string for a mapped locale.
- Open a Sanity document file in the Content editor. The header shows Ingest and Push to Sanity for that file. Choose Ingest to import the automation’s configured document set, or Push to Sanity when at least one mapped locale is fully approved and no push is already running.
- Confirm Sanity shows the new locale content as a draft. Publish in Sanity after you review those drafts.
Change or remove access
Disconnect Sanity from Integrations when this workspace should stop using that Sanity account. Inspect automations that depend on the connection before you disconnect. If a project or dataset is missing, confirm the Sanity workspace and that you completed authorization. See Connection troubleshooting.If import or push does not run
- Confirm Sanity is connected and the automation is Active.
- Confirm the project, dataset, and document types match the Sanity workspace.
- Confirm project locales map onto the dataset language tags.
- If Ingest or Push to Sanity is missing, open a Sanity document file. Those actions stay hidden on other files. Confirm an active Sanity automation is attached to the project and you can manage automations.
- Open Run History for the failed document or locale.

