Get the FREE Ultimate OpenClaw Setup Guide →

Contentful Automation

Scanned
npx machina-cli add skill ComposioHQ/awesome-claude-skills/contentful-automation --openclaw
Files (1)
SKILL.md
3.9 KB

Contentful Automation

Manage your Contentful headless CMS spaces directly from Claude Code. List spaces, retrieve metadata, and update space configurations without leaving your terminal.

Toolkit docs: composio.dev/toolkits/contentful


Setup

  1. Add the Composio MCP server to your configuration:
    https://rube.app/mcp
    
  2. Connect your Contentful account when prompted. The agent will provide an authentication link. Ensure your access token has space management scopes.

Core Workflows

1. List All Spaces

Discover all Contentful spaces accessible to your authenticated account. This is typically the first operation since most other actions require a space_id.

Tool: CONTENTFUL_LIST_SPACES

Key parameters:

  • limit (1-1000) -- maximum number of spaces to return (default: 100)
  • skip -- number of spaces to skip for pagination
  • order -- sort by field, e.g., sys.createdAt or -sys.createdAt for descending

Example prompt: "List all my Contentful spaces"


2. Get Space Details

Retrieve detailed metadata for a specific space including its current sys.version, which is required for updates.

Tool: CONTENTFUL_GET_SPACE

Key parameters:

  • space_id (required) -- the ID of the space to retrieve (alphanumeric, 1-64 chars)

Example prompt: "Get details for Contentful space abc123def"


3. Update Space Name

Update the name of a specific space. Requires the current version number for optimistic locking to prevent concurrent modification conflicts.

Tool: CONTENTFUL_UPDATE_SPACE

Key parameters:

  • space_id (required) -- ID of the space to update
  • name (required) -- new name for the space (1-255 chars)
  • version (required) -- current space version from sys.version (must be > 0)

Example prompt: "Rename Contentful space abc123def to 'Production Content Hub'"


4. Audit Space Inventory

Combine space listing and detail retrieval to audit your organization's Contentful spaces.

Tools: CONTENTFUL_LIST_SPACES then CONTENTFUL_GET_SPACE

Workflow:

  1. List all spaces to get IDs and names
  2. Fetch details for each space to get version info, creation dates, and metadata

Example prompt: "Audit all Contentful spaces -- list them with their creation dates and current versions"


Known Pitfalls

  • Version conflicts on update: CONTENTFUL_UPDATE_SPACE requires the latest sys.version from CONTENTFUL_GET_SPACE. If someone else modified the space between your read and write, the update will fail with a version conflict. Always fetch the space immediately before updating.
  • Pagination for many spaces: CONTENTFUL_LIST_SPACES uses limit and skip parameters. When you have many spaces, iterate by incrementing skip until no more results are returned to avoid missing spaces.
  • Scope limitations: These tools only manage space-level metadata (names). They cannot create or modify entries, content types, or assets within a space.
  • Auth/permissions mismatch: Updates via CONTENTFUL_UPDATE_SPACE will fail if your token lacks space management scopes, even if reads via CONTENTFUL_GET_SPACE succeed. Verify your token has write permissions.
  • Space ID format: The space_id must match the pattern ^[a-zA-Z0-9-_.]{1,64}$. Invalid characters will be rejected.

Quick Reference

Tool SlugDescription
CONTENTFUL_LIST_SPACESList all spaces accessible to your account
CONTENTFUL_GET_SPACERetrieve detailed metadata for a single space
CONTENTFUL_UPDATE_SPACEUpdate the name of a space (requires version)

Powered by Composio

Source

git clone https://github.com/ComposioHQ/awesome-claude-skills/blob/master/composio-skills/contentful-automation/SKILL.mdView on GitHub

Overview

Contentful Automation enables managing Contentful CMS spaces directly from Claude Code. It supports listing spaces, retrieving space metadata, and updating space configurations through the Composio Contentful integration, all without leaving your terminal.

How This Skill Works

The skill uses Contentful API tools (CONTENTFUL_LIST_SPACES, CONTENTFUL_GET_SPACE, CONTENTFUL_UPDATE_SPACE) via Claude. You connect your Contentful account during setup, and actions require a space_id; updating a space also requires the latest sys.version for optimistic locking to prevent conflicts.

When to Use It

  • You need to inventory all Contentful spaces across your organization.
  • You want detailed metadata for a specific space to plan changes.
  • You need to rename a space while ensuring no concurrent edits occur.
  • You are auditing spaces for creation dates, versions, and configurations.
  • You manage many spaces and want to paginate through results without misses.

Quick Start

  1. Step 1: Add the MCP server: https://rube.app/mcp and connect your Contentful account.
  2. Step 2: Ensure your access token has space management scopes and is ready for operations.
  3. Step 3: Run a sample workflow: LIST SPACES, GET SPACE for a chosen space, then UPDATE SPACE with a new name using the latest version.

Best Practices

  • Always fetch space details (GET_SPACE) right before an update to obtain the current version.
  • Use limit/skip thoughtfully when listing spaces to handle pagination and avoid missing spaces.
  • Validate space_id against the pattern ^[a-zA-Z0-9-_.]{1,64}$ before operations.
  • Ensure your Contentful token has space management scopes and test changes in a non-production space first.
  • Combine LIST and GET steps to build a complete inventory before making updates.

Example Use Cases

  • List all Contentful spaces with a maximum of 500 results.
  • Get details for space abc123def to view its current sys.version and metadata.
  • Rename Contentful space abc123def to 'Production Content Hub' using the latest version.
  • Audit all Contentful spaces to display their creation dates and current versions.
  • Paginate through 200 spaces by incrementing skip until no more results are returned.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers