Swarmz
IntegrationsContent, research, and media

Contentful

Read content models and entries, create or update drafts, and publish entries from a Swarmz project

Connect Contentful when a project needs to work with one Contentful space and environment. The AI can inspect the real content model before it builds queries or editing screens, so generated code does not have to guess field names.

Contentful uses a shared project connection. Everyone using the published app acts through the same Contentful identity and environment.

Availability

A Swarmz administrator must show Contentful under Platform config > Integrations. Contentful does not need a Swarmz OAuth app. A workspace member supplies a Content Management API token when they add the connection.

Before you connect

Collect these values from Contentful:

  • A personal Content Management API token with content_management_read for reads or content_management_manage for writes. Contentful explains how to create and scope a token.
  • The Space ID.
  • The Environment ID, such as master or a separate staging environment.
  • The Region: global or eu.

Use a dedicated token with the smallest required scope. Contentful grants the token the access of its owner, so do not reuse an unrestricted personal token when a narrower token will work.

Connect Contentful

  1. In the project, open Settings > Integrations and select Contentful.
  2. Select Add connection.
  3. Enter a display name, Space ID, Environment ID, and Region.
  4. Paste the Content Management API token into API key.
  5. Select Save connection. Swarmz checks the token against the selected environment before storing it.

The token is encrypted and stays behind the Swarmz connector gateway. It is not written to project files or returned to generated browser code.

Available operations

OperationWhat it doesLimit per minute
list_content_typesLists content types in the configured environment30
list_entriesLists entries, optionally for one content type30
get_entryGets one entry and its current version30
create_entryCreates a draft entry with localized fields10
update_entryReplaces all fields on an entry using its current version10
publish_entryPublishes the current entry version10

update_entry expects the complete localized fields object. Read the entry first, preserve fields that should remain, then submit the replacement. Contentful rejects an update or publish when another editor has changed the entry version.

Ask the AI to use Contentful

Name the content and the result you want. The AI requests the connection when the task needs live Contentful data.

  • “Build a resource library from the article entries in Contentful. Read the content type first and use the real field names.”
  • “Create a draft product announcement in our Contentful staging environment. Do not publish it.”
  • “Add a review screen that loads a draft entry, lets an editor change the title, and publishes only after confirmation.”

Generated server routes call the connector gateway. A published site can list or render entries, while an internal editor can create drafts and publish them if the connected token permits it.

Verify Contentful

  1. Ask the AI to list content types and confirm one known type.
  2. List entries for that type and open one known entry.
  3. In a non-production environment, create a draft with a unique test title.
  4. Read the draft back and compare its localized fields in Contentful.
  5. Publish only if the test environment allows it, then archive or delete the test entry in Contentful.

Troubleshoot and recover

If setup reports Contentful space configuration rejected, check the space, environment, region, and token access together. A valid token can still fail against an environment it cannot open.

If an update reports a version conflict, read the entry again, merge the intended change with the current fields, and retry with the new version. Do not repeat the stale update unchanged.

To rotate the token, create a replacement in Contentful, open the connection in Settings > Integrations, enter the new token, and select Save changes. Verify a read before revoking the old token. To remove access, select Remove in Swarmz and revoke the token in Contentful.

On this page