Contentful

Connect a Contentful space so Indexly Content Agents can create entries in your existing content model and save them as drafts or publish them to your delivery API.

What you can do

  • Create Contentful entries from Content Agent articles
  • Choose the space, environment, content type and locale
  • Map the title, slug, body, excerpt and featured image to your fields
  • Save new entries as drafts or publish them immediately

Before you begin

  • A Contentful space with an active content type for articles
  • Access to the environment where Indexly should create entries
  • A Contentful role that can read the content model, create entries and publish content if you enable automatic publishing

Prepare your content model

Indexly uses your existing content type. A typical article model has the following fields:

  • Title — Short text
  • Slug — Short text, preferably unique
  • Body — Rich text
  • Excerpt — Long or short text
  • Featured image — Media

You can use different field names; you will map them when you connect the integration. Make sure the content type is activated before continuing.

Create a Content Management API token

  1. Open your space in the Contentful web app.
  2. Go to Settings → CMA tokens.
  3. Click Create personal access token and name it Indexly.
  4. Choose an appropriate expiration date, generate the token and copy it immediately. Contentful only displays its value once.
Use a Content Management token. Content Delivery and Content Preview API keys cannot create entries. A personal access token acts with the same Contentful permissions as the user who created it.

Connect in Indexly

  1. In Indexly, open Integrations → Contentful and click Connect.
  2. Paste the Content Management API token, then click Test connection.
  3. Select the space and environment. Use master unless your site reads from another environment.
  4. Choose the content type and locale for new articles.
  5. Map Indexly's article fields to the fields in your content type:
    • Title → your short-text title field
    • Slug → your slug field
    • Body → your rich-text body field
    • Excerpt / meta description → your summary field
    • Featured image → your media field
  6. Choose Draft or Publish as the default entry status, then save the connection.
Required fields must be mapped. Contentful rejects an entry when a required field is missing or its value does not match the field's validation rules. Map every required field or make it optional in your content model.
Drafts are not available through the Delivery API. If you save articles as drafts, publish them in Contentful after review before expecting them to appear on your site.

Troubleshooting

  • 401 unauthorized — the token is incorrect, expired or revoked. Generate a new personal access token and reconnect.
  • 403 forbidden — the user who created the token does not have permission to manage entries or publish in the selected environment. Update the user's space role or use a token from a user with the required access.
  • Space or environment is not listed — the token owner does not have access to it. Confirm the user's organization, space and environment permissions in Contentful.
  • Content type is not listed — make sure the content type is activated in the selected environment.
  • Validation error — check for unmapped required fields, unique-field conflicts, character limits or a field whose type does not match the mapped article value.
  • Entry exists but is not on your site — confirm that the entry is published, the correct locale is published and your site reads from the environment selected in Indexly.
  • Image is missing — the asset may still be a draft, or the mapped field may not accept media. Publish the asset and verify the field mapping.

Related