Integrations / Contentful

Publish to Contentful

Creates and publishes an entry through the Content Management API.

How it works

Uses Contentful's Content Management API. Entries are created against your content model's field IDs, then explicitly published, since Contentful entries always start as drafts.

Before you start

  • A Contentful space with a content type suitable for blog posts
  • A Content Management API token (Settings, then API keys, then Content management tokens)
  • The content type's field IDs, not the display names

Setup

  1. 1

    Get your Content Management API token

    Settings → API keys → Content management tokens → Generate personal token.

  2. 2

    Open Setup in your client portal

    Setup shows the connection form for Contentful. If it says no integration is set up yet, message us in Questions and we’ll switch it on. Then fill in:

    FieldRequiredNotes
    Space IDYesapp.contentful.com → pick the space → Settings → General settings.
    EnvironmentNoExample: master
    Content type IDYesContent model → open the target content type → the ID is shown next to its name (not the display name itself).
    LocaleNoExample: en-US
    Field mapNoMaps our post fields to your content type's field IDs. Defaults shown are used for anything you leave out.Example: {"title":"title","slug":"slug","body":"body","excerpt":"excerpt"}
    Content Management API tokenYesFrom step 1. Stored encrypted; it can’t be viewed again once saved.
  3. 3

    Click Connect account

    This tests the details against Contentful without creating anything. When it passes, the portal shows “Connected successfully”; if it fails, it shows the error Contentful returned.

  4. 4

    Publish

    Once a piece has passed review, it is sent to Contentful through this connection. No export, import, or copy-pasting into a CMS.

After publishing

If a published piece is revised and pushed again, the same post in Contentful is updated rather than duplicated.

Troubleshooting

If this happensCheck this
Connection test fails with a 401Content Management tokens are different from the read-only Content Delivery tokens Contentful also issues. Confirm the token was generated under "Content management tokens", not delivery.
Entry is created but fields are emptyField IDs aren't always the same as the display name shown in the content model UI. Open the content type and check the ID listed next to each field.

Frequently asked questions

In Contentful, open your content type. The field ID is shown next to each field's display name, and it's not always the same text.

It defaults to master, but you can point it at any environment you use for staging.

Yes. Contentful entries always start as drafts, so this creates the entry and then explicitly publishes it in the same step.

Credentials are encrypted at rest and only ever used server-side to publish. Nobody, including us, can view them again once saved.

Nothing changes on Contentful itself. Everything already published stays exactly as it is. New posts just stop syncing until it's reconnected.

Want Contentful set up with you?

Book a call and we’ll connect it together.

Book a call