The Sanity integration is in Beta. Connect it per brand; nothing is shared across brands.
Before you start
- Your organization needs an active 3RD subscription with the Content Agent.
- You need edit access to the brand in 3RD. View-only members don’t see the Connect button.
- You connect per brand. Each brand links its own Sanity project and dataset.
- You need access to the project in sanity.io/manage to add an API token.
- The dataset needs at least one document of the type articles should go to, such as one blog post. 3RD lists only document types that already have a document. The type needs a text field for the title, a slug field and a Portable Text field for the body.
Connect Sanity
1
Open Integrations
In 3RD, open Settings → Integrations for the brand.
2
Click Connect
In the Sanity row, click Connect. The Connect Sanity window opens. Go to sanity.io/manage, open your project and copy the Project ID shown at the top. Paste it into 3RD and click Open this page in Sanity to jump to the project’s API settings.
3
Add an API token
In Sanity, open API, then Tokens, and click Add API token. Type
3RD as the name, choose Editor, and save. Copy the token. Sanity shows it only once.4
Paste your details
Back in 3RD, click Next. Check the Project ID, enter the Dataset (usually
production) and paste the API token, which starts with sk. Optionally add your Studio address, such as https://example.sanity.studio, so 3RD can link straight to each draft. Click Connect.5
Choose where pieces go
3RD checks the details with your project, then the Where pieces go window opens by itself. Pick the Document type, check the fields 3RD suggests, and click Save.
Choose where pieces go
Sanity needs a document type chosen before you can push. Until then, the Sanity row says Choose where pieces go before pushing. with a Choose button. 3RD fills these fields in each new draft:
Pick None for an optional field to leave it empty. If a type lacks a field 3RD needs, the window names the missing field. Pick another type, or add the field in your Studio.
Images are uploaded to your dataset. An image that can’t be copied stays a link to its original address, and 3RD tells you how many. Formatting your body field doesn’t support is written with the nearest style it has.
To change the type or fields later, open the ⋯ menu in the Sanity row and click Choose where pieces go.
Push an article to Sanity
1
Open the article
In the Content Agent, open a new article (not an optimization of an existing page).
2
Send it as a draft
Click Push to Sanity. If the brand has more than one CMS connected, the button says Push to CMS and you pick Sanity in the window. Check the Address and click Send as draft. 3RD shows Draft created in Sanity when it’s done.
3
Review it in Sanity Studio
Open the document type in your Studio. The new document is a draft.
Drafts only
3RD only ever creates or updates drafts. It never publishes and never deletes anything, whatever role the token has. Once a document is published in Sanity, 3RD leaves it alone, even if someone has started a new draft on it. Pushing that article again shows a message asking you to edit it in Sanity. If someone edits the draft in Sanity while 3RD is sending it, 3RD overwrites nothing and asks you to push again.Disconnect
Open the ⋯ menu in the Sanity row and click Disconnect. 3RD stops sending anything to Sanity and deletes the token it stored. Documents already in Sanity stay where they are. Deleting the3RD token in sanity.io/manage also removes 3RD’s access. The next time 3RD tries to reach your project, the row shows Reconnect needed.
Troubleshooting
Related
- Content Agent: where the articles are written
- HubSpot: the same flow for HubSpot blogs and pages