Passing JSON-LD Schema via API

Long time listener, first time caller here.

I’ve managed to set up an Airflow → Webflow CMS system for my content that works great. The only problem we’re having is that when I try to pass the structured data (Schema), Webflow adds all sorts of characters to it rendering it no-longer a valid as schmea markup.

Any ideas on how to fix this?

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Hey Mark, nice to have you call in.

That JSON is HTML encoded. Your screenshot looks like a Chrome devtools view, so what I’m guessing you’ve done is →

  1. Transported your Airflow ( Airtable? ) data into the Webflow CMS ( to a plain text field )
  2. Added an HTML embed into a Collection page
  3. Typed in your script tags
  4. Embedded that plain text field
  5. Published & and viewed the resulting pages

If my guess is right, you’re probably fine on steps 1 through 3; step 4 is where the encoding is happening. Webflow always HTML encodes content that it publishes into the page, and normally that’s what you’d want. Except with code.

Unfortunately there’s no CMS code field, so you can either decode it after the fact using client-side script, or you might be able to store your script inside of a rich text CMS field, inside of an HTML embed sub-element. I’m not certain if that construction can be created through the API, as I’m aware it strips some stuff from HTML when you provide it through the API. Try searching the forums on that with some creative search terms.

Here are some notes on both approaches, but your case is slightly unique since you have the added step of feeding your content in through the API.