Skip to content
Menu

Integrations

Contentful, Sanity, JSON feeds and Braze catalogs

BetaMarkdown version

Keep message copy in your CMS. Herald syncs it into your library, so agents test and pick from the copy your team already writes.

Note

Built and tested against each vendor's documented API, and checked against live Contentful and JSON feed data; tell us if anything differs in your account.

What you'll need

  • Contentful: the space ID, the environment (default master), the content type that holds your messages, and a Content Delivery API token for that space (Settings → API keys).
  • Sanity: the project ID, the dataset (default production), and a GROQ query that returns your messages. A read token only if the dataset is private (Settings → API → Tokens, Viewer).
  • JSON feed: a public https URL that returns your messages as JSON, and a bearer token if the feed needs one.
  • Braze catalog: a Braze connection in Settings → Sending & SDK, and the catalog's name.

What it does

Data in. Each item becomes a message variant in your Herald library, under one library message per source and channel (for example "[contentful] push library"). Agents can then use those variants like copy written in Herald. Edits in your CMS update the variant on the next sync, and an item removed from the source is archived. Contentful locales come in as translations.

Supported data

DataDirectionModeNotes
Message copy (title, subject, body, CTA, deep link, image, HTML body, tags)InDaily, or Sync nowOne variant per item
TranslationsInWith each syncContentful locales

Connect

  1. In Settings → Content sources, turn on the source.
  2. Fill in its fields and paste the token in the token field. The token is saved encrypted when you press Save, and never shown again.
  3. Press Test connection. You see up to three mapped items from the source.
  4. Press Sync now. The run appears in the sync history with how many items were created, updated, archived or skipped.

How matching works

Each item is matched to its variant by its id in the source (sys.id in Contentful, _id in Sanity, id in a JSON feed, the item id in a Braze catalog). An item without a body is skipped and listed in the run's errors.

Configure

Field mapping says where each part of the message lives in your items. The defaults:

FieldContentfulSanityJSON feed
Idsys.id_idid
Titlefields.titletitletitle
Bodyfields.bodybodybody
Tagsmetadata.tags[*].sys.idtagstags

Paths use dots, [0] for an index and [*] for every item in a list. A JSON feed can page by a cursor in the response (nextPath and the query param that carries it) or by page number (param and pageSize).

Limits

  • 100 items per page and 500 pages per sync, so up to 50,000 items per source.
  • Each request times out after 10 seconds, and redirects aren't followed.
  • A JSON feed's host must be public: private and local addresses are refused.
  • An item is archived only after a complete listing, so a failed sync never archives anything.

Validate your setup

Test connection shows up to three items as Herald will store them: the id, title, body and any translations. If the body is empty, fix the mapping before you sync.

Troubleshooting

Each sync is listed under the source with its status and first error.

Common errors

ErrorWhat to do
Add a Contentful Content Delivery API tokenPaste the space's delivery token and press Save.
Content URL must be public httpsUse an https URL on a public host.
invalid or missing bodyPoint the body mapping at the field that holds your message text.
Choose the Braze connection to read the catalog fromPick the Braze connection, then save.
The saved token can't be read; save it againPaste the token again and press Save.

See Herald decide live →