Docs / Website Integration

Contentful Setup Guide

Build Contentful publish-webhook config that targets Crawlbaby’s shared page-change intake endpoint. This keeps Contentful first-class in Website Integration without adding OAuth, a provider runtime, or a new webhook route.

Showing placeholder site values. Open this from a site settings page to prefill the Crawlbaby endpoint and production domain.

1

Basics

Use the site’s saved base URL as the production domain. Generate one publish webhook so Contentful publish deliveries map cleanly into Crawlbaby’s shared contract.

Production domain
https://example.com
Webhook token
Create or rotate it in Website Integration first.

Use either a route pattern with {slug} and {locale}, or supply a full path field that already stores a site-relative route like /blog/my-post.

2

Generated Config

Create one publish webhook in Contentful Space Settings -> Webhooks. It uses the same Crawlbaby endpoint and token header shown here.

Endpoint URL
https://app.crawlbaby.com/api/sites/<your-site-id>/events/page-changed
Primary auth
X-Crawlbaby-Event-Token: <site webhook token>
Alternate auth
Authorization: Bearer <site webhook token>
Source event id format
contentful:<space>:<environment>:<entity>:<topic>[:v<version-or-revision>]
Recommended topics
  • Publish webhook: Entry.publish
  • Delivered topic headers land as: ContentManagement.Entry.publish
Headers
X-Crawlbaby-Event-Token: <site webhook token>

Use X-Crawlbaby-Event-Token as the primary auth contract. Contentful signing secrets are optional hardening only for this v1 path.

Optional filters

No environment or content type filters were generated. If your live site publishes from a non-master environment or only a few content types, add filters before saving the webhook.

Publish body transformation
{
  "url": "https://example.com/{ /payload/fields/slug/en-US }",
  "eventType": "updated",
  "source": "contentful",
  "sourceEventId": "contentful:{ /payload/sys/space/sys/id }:{ /payload/sys/environment/sys/id }:{ /payload/sys/id }:{ /topic }:v{ /payload/sys/version }",
  "checksum": "{ /payload/sys/version }",
  "payload": {
    "topic": "{ /topic }",
    "spaceId": "{ /payload/sys/space/sys/id }",
    "environmentId": "{ /payload/sys/environment/sys/id }",
    "entityId": "{ /payload/sys/id }",
    "contentTypeId": "{ /payload/sys/contentType/sys/id }",
    "locale": "en-US",
    "version": "{ /payload/sys/version }"
  }
}

Use this with Entry.publish so Contentful deliveries become Crawlbaby updated events.

Publish payload example
{
  "url": "https://example.com/example-entry",
  "eventType": "updated",
  "source": "contentful",
  "sourceEventId": "contentful:space_abc:master:entry_123:ContentManagement.Entry.publish:v57",
  "checksum": "57",
  "payload": {
    "topic": "ContentManagement.Entry.publish",
    "spaceId": "space_abc",
    "environmentId": "master",
    "entityId": "entry_123",
    "contentTypeId": "landingPage",
    "locale": "en-US",
    "version": 57
  }
}
Test instructions
  1. Create or rotate the Crawlbaby webhook token in Website Integration before saving the Contentful webhook.
  2. In Contentful Space Settings -> Webhooks, create a publish webhook with Entry.publish selected and paste the publish body transformation below.
  3. Use Contentful’s test delivery for the publish webhook. Crawlbaby should accept the event on /api/sites/{siteId}/events/page-changed and report source contentful with a deterministic sourceEventId.
Limitations / assumptions
  • Use one publish webhook only. Unpublish/delete handling is intentionally excluded from this manual Contentful path.
  • Recommended topic is Entry.publish only. Avoid save, auto-save, and unpublish topics because they create editor noise or unsupported removals instead of live-page changes.
  • This setup supports either a single full-path field or a route pattern with {slug} and {locale}. If your public URL depends on linked entries or deeper routing state, store the final public path on the entry and use that field directly.
  • No environment filters were supplied. Per Contentful’s webhook filter docs, deliveries default to the master environment when filters are omitted.
  • Contentful signing secrets are optional hardening. This v1 path authenticates primarily with X-Crawlbaby-Event-Token and does not require runtime signature verification.