Connect Contentful

Contentful needs a Space ID, an optional environment which defaults to master, and a CMA personal access token. Your content type needs title and slug fields plus a Long text body field, because Rich Text is not supported yet.

Last updated 1 day ago

Contentful has one limitation worth knowing before you start: Rich Text is not supported yet. Your body field needs to be a Long text field.

Available on every plan.

What you Need

  • A Space ID.
  • A CMA personal access token.
  • A content type with a title field, a slug field, and a Long text body field.

The Content Type Requirement

Your content type needs three fields NarraSEO can write to: a Symbol or Text field for the title, one for the slug, and a Long text field for the body.

If your existing blog content type uses a Rich Text body field, NarraSEO cannot publish into it yet. You will need a Long text field instead.

This is the thing to check first, because it can mean a schema change rather than a five-minute setup.

Step 1: Create a CMA Token

In Contentful, open Settings β†’ CMA tokens and create a personal access token.

It begins with CFPAT- and is shown once. Copy it immediately.

Note that this is the Content Management API token, not a Content Delivery API key. Delivery keys are read-only.

Step 2: Find your Space ID

Under Space settings. It looks like abcd1234efgh.

Step 3: Enter the Credentials

  1. Open Sidebar β†’ Integrations.
  2. Find Contentful under Publishing & CMS.
  3. Fill in the fields:

Field

Required

What to enter

Space ID

Yes

From Space settings

Environment

No

Usually master, which is the default

CMA personal access token

Yes

The CFPAT- token from step 1

  1. Select Connect Contentful.

The token is stored encrypted.

Step 4: Verify

Select Verify connection. On success you see "Contentful connection verified."

On failure: "Could not verify the Contentful connection. Check the space ID, environment, and CMA token."

Field Mapping, Set when you Publish

Contentful is the only integration that needs field mapping at publish time, because your content model is your own.

In the Publish panel you choose:

  • Content type, noted as needing "three Symbol/Text fields, including one Long text field for body (not Rich Text)."
  • Title field
  • Slug field
  • Body field

Set these once and they carry forward.

Publishing Options

Contentful offers Draft and Publish. There is no scheduling, unlike most other integrations.

If it Will Not Connect

You used a Content Delivery API key. It must be a CMA personal access token, beginning with CFPAT-.

The environment is wrong. If your space uses a non-default environment, enter its name. Leaving it blank uses master.

Your body field is Rich Text. Not supported yet. Add a Long text field.

The token was revoked. CMA tokens can be revoked in Contentful settings.

Notes

Contentful publishing creates entries. Whether they appear on your website depends on your own front end and how it queries Contentful.

Because Contentful is headless, "Publish" means the entry is published in Contentful. Your site build or revalidation may need to run before readers see it.

The connection is per project.