DashboardSign inStart your trial

Sanity

Reference

21 actions for Sanity workflows.

01. Operations

Act on Sanity from a workflow

Operations are the actions a workflow can take in Sanity, grouped by category. Each lists its method, parameters, and a template you can drop it into.

Authentication

1 operation

Verify that your connection credentials are valid before executing other operations. Use this to test connectivity and ensure your API token has the necessary permissions to interact with Sanity's content management system.

Action★ Featured

Validate Credential

SANITY_VALIDATE_CREDENTIAL

Verify that your Sanity API token is valid and properly configured by retrieving your authenticated user information and accessible projects. This ensures your connection to Sanity is working correctly before performing other operations.

Documents

3 operations

Manage individual content items stored in Sanity by retrieving, modifying, or removing documents. These operations enable you to automate content workflows such as publishing, archiving, or syncing specific documents across your systems.

Action★ Featured

Delete Document

SANITY_DELETE_DOCUMENT

Permanently remove documents from your Sanity content repository by ID or query, with options to preview changes before committing. Useful for cleaning up outdated content, managing large-scale deletions, or maintaining data hygiene in your headless CMS.

9 input
Action★ Featured

Get Document by ID

SANITY_GET_DOCUMENT

Retrieve a specific piece of content from your Sanity repository using its unique ID, getting back the complete document with all metadata. Use this when you need to quickly access a known document without writing queries.

3 input
Action★ Featured

Query Documents

SANITY_QUERY_DOCUMENTS

Search and retrieve specific content from your Sanity content library using custom queries, allowing you to filter, organize, and transform your data exactly how you need it.

6 input

Projects

1 operation

Access information about your Sanity projects and their configurations. This operation helps you retrieve project metadata needed for managing multi-project workflows or validating project settings programmatically.

Action★ Featured

Get Project

SANITY_GET_PROJECT

Retrieve complete project details from your Sanity workspace, including configuration, display name, organization, and studio information. Use this when you need to verify project settings or access comprehensive project metadata.

1 input

Other

16 operations

Handle advanced administrative and organizational settings including user management, roles, permissions, and security configurations. These operations support complex enterprise workflows where you need to manage team access, audit screening results, and maintain granular permission controls across your Sanity organization.

Action★ Featured

Create Prompt Post

SANITY_CREATE_PROMPT_POST

Send a single prompt to generate or manage content in Sanity without maintaining conversation history, perfect for quick one-time content requests.

5 input
Action

Add Default Role to Users

SANITY_ADD_DEFAULT_ROLE_TO_USERS

Automatically assigns your organization's default role to all existing team members, ensuring consistent access permissions across your entire workspace.

1 input
Action

Create Attribute Definition

SANITY_CREATE_ATTR_DEFINITION

Define custom attributes for your Sanity resources to capture specialized data like customer tiers, subscription levels, or product categories. This lets you organize and filter your content based on business-specific metadata.

7 input
Action

Delete User Attribute Definition

SANITY_DELETE_ATTR_DEFINITION

Remove custom field definitions from your Sanity project when they're no longer needed, preventing users from setting values for outdated attributes while keeping existing data intact.

3 input
Action

Delete User Attributes

SANITY_DELETE_USER_ATTRIBUTES

Remove custom fields or metadata from team member profiles in your Sanity workspace to keep user information clean and relevant. This helps you maintain accurate records when certain profile data is no longer needed or becomes outdated.

3 input
Action

Get Invite By Token

SANITY_GET_INVITE_BY_TOKEN

Retrieve details about a team invite using its public token, including status, assigned role, and who sent the invitation.

3 input
Action

Get Organization Role

SANITY_GET_ORG_ROLE

Retrieve details about a specific organization role including its title, description, and permissions to understand what capabilities are assigned to that role within your organization.

2 input
Action

Get Permission

SANITY_GET_PERMISSION

Retrieve detailed information about a specific permission assigned to a resource, including what actions are allowed and who can perform them.

3 input
Action

Get Robots

SANITY_GET_ROBOTS

Retrieve a list of service accounts (robots) that have access to your Sanity resources, along with their assigned permissions and roles.

5 input
Action

Get Role

SANITY_GET_ROLE

Fetch detailed information about a specific role in your Sanity workspace, including its permissions, title, and description to understand who can do what in your content management system.

3 input
Action

List Organization Roles

SANITY_LIST_ORG_ROLES

Retrieve all available roles that can be assigned to users within your Sanity organization, helping you understand permission levels before assigning team members to specific roles.

1 input
Action

List Resource Users

SANITY_GET_USERS

Retrieve all users who have access to your Sanity project along with their assigned roles, helping you manage team permissions and access levels.

4 input
Action

List User Attributes

SANITY_LIST_USER_ATTRIBUTES

Retrieve detailed user attributes and roles from your Sanity organization to understand team member permissions and access levels. This helps you manage who has access to what content and features across your project.

4 input
Action

Query All Screening

SANITY_QUERY_ALL_SCREENING

Retrieve all screening documents from your Sanity content database using a flexible query system. This helps you access testing, evaluation, or vetting records stored in your content management system.

5 input
Action

Update Organization ACL

SANITY_UPDATE_ORG_ACL

Assign or modify team member roles within your Sanity organization to control who has access to specific features and content management capabilities. This helps you manage team permissions as your project grows.

3 input
Action

Update User Attributes Values

SANITY_UPDATE_USER_ATTRIBUTES_VALUES

Modify custom user attributes and metadata in your Sanity workspace to store additional information about team members or clients. This lets you organize and track user-specific data like department, role, or custom tags without cluttering your main content structure.

4 input
What now

Use Sanity in a workflow

Drop a trigger and an action into a template; approve from your phone; the workflow runs.