Why Connect Sanity?
Content Search
Chatbot can search and retrieve Sanity documents
Knowledge Base Sync
Automatically sync Sanity content to your knowledge base
Structured Content
Works with Sanity’s powerful structured content
Project Token Auth
Secure authentication with project tokens
Prerequisites
- Sanity project with content
- Admin access to your Sanity project
- Project token (API token) generated from your Sanity dashboard
- Sanity dataset configured
Setup Steps
1
Navigate to Integrations
Go to Dashboard → Integrations and find the Sanity card
2
Click Connect
Click Connect Sanity to open the connection form
3
Get Project ID
Find your Sanity Project ID:
- Log in to your Sanity dashboard
- Navigate to your project
- Copy the Project ID from the project URL or settings
- Format:
https://www.sanity.io/contacts/project/YOUR_PROJECT_ID
4
Generate API Token
Create an API Token in your Sanity dashboard:
- Go to Manage → API → Tokens
- Click Add API token
- Enter a label (e.g., “BubblaV Integration”)
- Select permissions: Editor or Viewer
- Click Add
- Copy the generated token (shown only once)
5
Enter Dataset
Enter your Sanity dataset name (default is “production”)
6
Enter Credentials
Enter your Project ID, Dataset, and API Token
7
Verify Connection
Click Connect. The Sanity card should now show Connected
Available Tools After Connection
| Tool | What It Does | Example Query |
|---|---|---|
sanity_search_content | Search Sanity documents | ”Find articles about pricing” |
sanity_sync_knowledge_base | Sync content to knowledge base | Syncs your Sanity content automatically |
Test Your Integration
Try these queries on your website:- “What do you have about [topic]?”
- “Show me articles about [subject]”
- “Find documents related to [keyword]“
Troubleshooting
Authentication fails
Authentication fails
- Verify your Project ID and API Token are correct
- Check that the token hasn’t been revoked
- Ensure the token has at least Viewer permissions
- Make sure you’re entering the dataset name correctly (case-sensitive)
Connection fails
Connection fails
- Verify your Project ID is correct
- Check that your dataset exists and has content
- Ensure your project is accessible via the API
- Try using Sanity’s API explorer to test access
Content not syncing
Content not syncing
- Wait a few minutes for the initial sync to complete
- Check that your dataset has published documents (not just drafts)
- Verify that the API Token still has valid permissions
- Check that documents have the _id and _type fields
Dataset not found
Dataset not found
- Ensure you’re using the correct dataset name
- Default dataset is usually “production”
- Check your dataset names in the Sanity dashboard
- Dataset names are case-sensitive
GROQ query issues
GROQ query issues
- Sanity uses GROQ (Graph-Relational Object Queries)
- The integration uses standard queries that work with most schemas
- Custom schemas may require query adjustments
- Contact support if you have complex schema requirements
Security: We use Sanity API Tokens for authentication. These tokens can be revoked or regenerated at any time from your Sanity dashboard without affecting your application.
