DeepSmith

Nov 26 · Content Operations

19 min read

How to Connect an AI Content Platform to Webflow, Shopify or a Headless CMS

Avinash Saurabh
Avinash Saurabh · CO-Founder & CEO
Abstract monochrome diagram of one article block connected through a gateway node to three stacked website cards, with the cover line Connect Content to Your CMS.

Your articles are finished, and now they have to get into a website that expects different fields, different body formatting and its own way of handling images. Most CMS integration AI content problems show up right here, after the first push, when the title arrives but the body is flat text and the cover image is missing. This guide walks you through eight steps to get a tested draft into Webflow, Shopify, or a headless CMS such as Contentful, Sanity or Strapi 5, so you can decide when to let it run on its own.

You will not do every part alone. A marketing lead usually owns the decisions (which route, which fields, who approves), while an administrator or developer supplies credentials, field identifiers and any conversion code. This guide does not cover WordPress, which has its own setup.

One idea runs through every step. Creating a record in the CMS, publishing that record, and showing it on your website are three separate things. A successful API response only proves the first.

1. Choose the integration route and set the publishing rule

Pick one route before anyone shares a password. These are the realistic options:

  • Native connector. The platform lists your destination. You still confirm permissions, field mapping, image behavior, draft controls and update behavior.
  • Webhook plus a receiver. The platform sends content events and your CMS has a management API. Someone builds signature checks, filtering, conversion, image handling and monitoring.
  • Manual export. Fine for a small pilot, with the same formatting and draft checks.

DeepSmith publishes from Produced Content straight to WordPress, Webflow, Strapi, Sanity or Contentful, or to your own webhooks, with Markdown and HTML export as a fallback. If you use Webflow, Strapi, Sanity or Contentful, start with the native connection and test it with the checks in this guide. Shopify is not on that list, so treat it as a custom route: a webhook, a small receiver and Shopify's own API. The same custom route is the base of most headless CMS content automation.

Then write down one operating rule in plain words: "Create drafts only. A named reviewer publishes them after checking the preview." A finished generation run is not the same as editorial approval, so decide which article state may trigger a push.

You are done when the team can name the source, the destination, the connection method, the article state that triggers a push, the draft state in the CMS, the reviewer and the person who owns failures. A webhook is only a notification, and something on the other end still has to write to the CMS.

Common mistake: Pointing a webhook straight at a CMS create endpoint. That skips field conversion, image handling and duplicate protection, which a receiver normally covers.

2. Prepare the destination and a safe preview

Before you map anything, look at how the CMS stores an article. Ask the CMS owner for technical identifiers, not just the labels editors see. For Webflow, that means the Collection ID and field slugs. For Shopify, the target blog's global ID and the author. For Contentful, the space, environment and content type ID. For Sanity, the dataset and document type. For Strapi 5, the plural API identifier and the Draft & Publish setting.

For the first test, use a non-production destination, a test collection, or any isolated place that mirrors your real schema.

Next, list the values your site needs for each article: title, a stable slug or handle, body, excerpt, cover image with alt text, author, categories or tags, SEO title and description, the source article ID, locale and publishing state. A field that is not connected to the page template will never show up for readers.

You are done when an editor can create a realistic draft by hand in the destination, view it through the preview you plan to use, and the adapter's owner has every field identifier. People go wrong by mapping to "Article Body" when the API wants a different technical key, sending a category name to a field that expects another record's ID, choosing the wrong environment, and assuming a headless CMS comes with a public article page. It does not. The page is part of your website's frontend.

3. Authorize the connection with the narrowest permissions

Use server-side credentials that can write the content you intend to write, and nothing broader. Then make one small, harmless request to prove the connection reaches the right place before you send a full article.

Let the CMS administrator authorize an existing connector, or create a dedicated integration credential. Keep every secret in a secret store or protected server environment, never in browser code. Keep the webhook signing secret and the CMS write credential apart, because they do different jobs.

Each system has its own detail:

  • Webflow. Creating items needs a bearer token with the cms:write scope, aimed at the correct Collection ID.
  • Shopify. Use an approved GraphQL Admin API app, not a storefront credential. The articleCreate mutation accepts either write_content or write_online_store_pages. Asking for a scope is not the same as having it approved, so check the scopes the installed app was actually granted.
  • Contentful. Use a management API token. A content delivery token cannot create entries.
  • Sanity. Mutation requests need a bearer token with write permission.
  • Strapi 5. Use a bearer API token with permission to create and update your article type and handle media. Do not open anonymous write access to fix a permission error.

You are done when the connection reaches the correct destination with the intended permissions and has changed nothing that is live. Wrong store, wrong environment, expired tokens and an admin secret stored in a frontend app are the usual causes of trouble.

4. Map the article fields and build the draft payload

Start with a small mapping: title, body and draft state. Add the rest only after those three work.

In DeepSmith, Produced Content is where you review and edit the finished article, its metadata and its cover image, so check all three there before you test any connection. DeepSmith's content event includes the title, slug, body, cover image, meta title, meta description and keywords, but a source field being available does not prove a connector fills the matching field on the other side.

Source valueWebflowShopify article input
TitlefieldData.nametitle
SlugfieldData.slughandle
BodyA Rich Text field with supported HTMLbody, an HTML value
Cover image and alt textAn image object with url and altimage input with url and altText
TagsCustom or reference fieldstags, a list of strings
SEO title and descriptionCustom fields tied to your SEO setupNo top-level SEO input, so use your own metadata fields
Draft stateisDraft: trueisPublished: false

Webflow draft

If you want to auto publish to Webflow later, build the draft first. For new integrations, Webflow's documentation recommends the insert route, and the item below is only an example. The post-body name assumes a Rich Text field with that slug, so use your own.

POST /v2/collections/[collection_id]/items/insert
Authorization: Bearer [CMS_TOKEN]
{
  "items": [
    {
      "isDraft": true,
      "fieldData": {
        "name": "CMS integration test",
        "slug": "cms-integration-test",
        "post-body": "<h2>Draft check</h2><p>This is a test article.</p>"
      }
    }
  ]
}

The documented response is a 202, which means the request was accepted, so open the created item and look at the stored values before you call it done. New items default to drafts, but keep isDraft: true in the request while you test. Setting isDraft: false queues the item for the next site publish, and publishing a single item is its own operation.

Shopify draft

Shopify's articleCreate mutation creates a blog article inside an existing blog. It does not create a product or a page.

{
  "article": {
    "blogId": "[BLOG_GLOBAL_ID]",
    "title": "CMS integration test",
    "author": { "name": "Editorial Team" },
    "handle": "cms-integration-test",
    "body": "<h2>Draft check</h2><p>This is a test article.</p>",
    "isPublished": false,
    "tags": ["integration-test"]
  }
}

The title and author are required, and the blogId has to be the blog's real global ID, not its name. Tags go in as a list of strings, and the handle should stay stable after launch. Look at the mutation's userErrors, because a successful HTTP response does not mean the article was created.

Contentful, Sanity and Strapi 5 drafts

For Contentful, you post to the entries endpoint of your space and environment with the content type ID in the X-Contentful-Content-Type header. Field values are wrapped in a locale key such as en-US, which is an example and not a default for every account. The response is a 201, and new entries are drafts that will not appear in the Content Delivery API until published.

For Sanity, a draft document has an ID that begins with drafts., created through the authenticated mutation API for your dataset. createIfNotExists is a safe first write, but it is not an update. createOrReplace swaps out the whole document, so avoid it when editors may have added changes.

For Strapi 5, turn on Draft & Publish and post to /api/[pluralApiId]?status=draft with the field values inside a top-level data object. Set status=draft on purpose, because Strapi's REST documentation says requests default to published. Save the returned documentId, and remember that REST responses leave out media and relations unless you ask for them with a populate query.

You are done when every required field has a destination key, a type, a conversion and a rule for a missing value, and a minimal payload creates the right unpublished record. The common slips are confusing a label with a field key, sending empty strings to reference fields, leaving out the required author, and using create requests for every later revision.

5. Convert rich text and bring in images deliberately

A title and slug arriving correctly tells you very little about how the article will look. Body formatting and images each need their own rules.

First, find out what format your source body really has by looking at a real payload. A field named body does not say whether it holds HTML, Markdown or something else. Webflow Rich Text and a Shopify article body take HTML. Contentful's native Rich Text field needs its own structured format, Sanity bodies are often Portable Text, and Strapi depends on the field you chose. Do not expect one body format to work across all three headless systems.

A few conversion rules help whatever you use:

  1. Parse the source format instead of making blind find-and-replace edits.
  2. Keep the H2 and H3 structure, and check whether your template already prints the title as an H1.
  3. Flag unsupported elements such as tables, code blocks and embeds instead of silently deleting content.
  4. Check the rendered preview, not only the stored values.

One Webflow limit is worth knowing: its documentation says code blocks are not currently supported in Rich Text through the API, and passing one results in an empty string. If you publish technical tutorials, test a code block early.

Handle the cover image and inline images separately, and map alt text on purpose, since a title, a caption and alt text are three different things. In Webflow, image fields take a url and an optional alt, the source must be publicly reachable by Webflow's servers, and the documented limit is 4 MB per image. In Shopify, the article image input takes a url and altText, and inline images in the body need valid references in the HTML. In Contentful, you create an asset from a remote file or upload to the Upload API and link it to an asset, and the temporary upload expires after 24 hours if the steps are not finished. In Strapi 5, upload with POST /api/upload as multipart form data in a field named files, then link the media to the article through your schema's media field.

You are done when the cover and at least one inline image show in the destination preview, the alt text is where you expect it, and the body has no escaped HTML, lost headings or missing list items.

Pro tip: Build a deliberately difficult test article rather than a two-sentence sample, with headings, lists, a link, accented characters, a cover image and an inline image.

6. Set the trigger and make processing repeat-safe

Now decide what starts the push. You want it to fire on the right article state, check that the message is real, and update a known CMS record instead of creating a new article every time an event arrives.

This is the third place DeepSmith earns a mention, because its webhooks can drive a custom receiver, including the Shopify route. Set it up like this:

  1. Open Settings, then Webhooks, and click Add Webhook.
  2. Enter your receiver's endpoint and a name.
  3. Subscribe to content.status_updated, the event for syncing articles.
  4. Save, then copy the signing secret right away. It is shown in full only once, and afterward you see just the last four characters. If you lose it, make a new webhook.
  5. Store the secret in your receiver's environment or secret manager.
  6. Use Send Test Event before you turn on real processing.

Every event arrives in an envelope with the event name, a timestamp, the workspace ID, an is_test flag and the event data, which for content includes the article's ID, title, status, body and slug.

Here is a sensible order of work for the receiver:

Receive the request and keep the raw body
Verify the signature
Parse the envelope, check event type and workspace
Send test events down a safe test path
Check the article status and required content
Save the job somewhere durable, then acknowledge
Find the destination record for this article
Convert the body, bring in images
Create a draft, or update the existing draft
Store the destination ID, the result and any errors

DeepSmith signs each delivery with HMAC-SHA256 using the signing secret. The signature comes in the X-Webhook-Signature header with a sha256= prefix, and you calculate it over the raw request body, not over JSON you parsed and wrote out again. Compare with a constant-time function, and use HTTPS. Reply with a 2xx only once the job is safely saved or done, or a failure could lose it.

For duplicates, keep a lasting record that ties each article to its destination: the source workspace, the source article ID, the destination and the locale, mapped to the destination record ID and a version or hash. When the same eligible article comes in again, find the stored ID and update that record. Do not rely on the slug alone, because slugs change and two workspaces can share one. The delivery ID can help, but the documentation describes a new ID for each attempt, so protect the write with the article-to-record mapping too.

You are done when a valid event creates or updates one destination draft, a bad signature is rejected, and replaying the same event does not create a second article. The usual problems are publishing on every status change and treating test events as real content.

7. Push one draft and look at the real page

Test three things separately, because passing one tells you nothing about the other two: the delivery of the event, the storage in the CMS, and what the page actually shows.

Start with delivery. DeepSmith's test events carry is_test: true, show a Test badge in the delivery history, can be sent even while the webhook is disabled, and use sample data with all-zero UUIDs. They confirm routing and signature checks, but not whether a real article works.

If you plan to auto publish to Webflow, this is the test that earns it. Move one real, reviewed, non-sensitive article into the draft destination. It should have two heading levels, numbered and bulleted lists, an internal and an external link, punctuation and non-English characters, a cover image with alt text, an inline image, an excerpt, metadata and any required author or category. Keep live publishing off, and check each of these:

  • Delivery. The event arrived, the signature was verified and the request was acknowledged.
  • Creation and identity. The CMS reports success with no validation errors, and the destination record ID is saved against the source article ID.
  • Content and formatting. Title, slug, body, excerpt and author match your mapping, and headings, lists and links render properly.
  • Images and metadata. Images load in preview, alt text is filled in, and your template uses the metadata.
  • Repetition and revision. Replaying the job creates no second article, and a small edit updates the right draft without overwriting protected editorial work.
  • Failure. A deliberately bad field gives a clear failure instead of silent loss.

Then check each destination. In Webflow, look at the draft item and the Collection template. In Shopify, find the article under the intended blog and confirm it is hidden. In Contentful, Sanity and Strapi, inspect the draft in the editor, and expect it to be missing from public delivery queries until you publish it.

You are done when an editor signs off on the preview, a repeat push is safe, an update lands on the correct record, and the public site has not changed. If the CMS has the article but your website does not, check the draft state, the preview authorization, the template, the delivery API, and then any frontend rebuild or cache, in that order.

8. Turn on controlled automation and name a failure owner

Automate the path you have verified, not a shortcut to publishing that nobody has tested. This is the point where headless CMS content automation becomes safe to rely on.

  1. Keep draft-first as the default until the team deliberately agrees to publish live.
  2. Name a reviewer, and write down which changes need approval.
  3. Decide which system owns the body, slug, metadata and publishing state after handoff.
  4. Watch webhook deliveries and CMS write results as two separate things, and alert an owner when either fails.
  5. Keep a replay procedure that uses the stored record identity.
  6. If your headless site needs a rebuild or cache clear, set that up as its own step, because a CMS write does not automatically update every frontend.

On the DeepSmith side, failed deliveries are retried up to three times, after 10 seconds, 60 seconds and 5 minutes. A webhook is disabled automatically after 10 failures in a row, so you need to notice that and re-enable it once you have fixed the cause. A delivery can succeed while your receiver fails later, so track that separately.

You are done when the workflow has an owner, a review policy, useful logs and a duplicate-safe recovery plan. Watch for a disabled connection nobody notices and overwritten editor changes.

What to do next

Once your CMS integration AI content workflow passes the checklist, run it for a couple of weeks with a named reviewer and failure owner, and only then talk about letting articles publish themselves. If you want to see how the content-to-CMS path works with your own destination, you can start a DeepSmith free trial.

Frequently asked questions

How do I connect an AI content platform to Webflow?

Use a supported Webflow connector, or have a receiver call Webflow's CMS API with an authorized token. Map the article to the real fields of your Collection, send supported HTML to the Rich Text field, give images in the documented format, and create a draft before you turn on publishing.

Can I send AI-generated articles to Shopify automatically?

Yes, a custom workflow can create blog articles through Shopify's GraphQL Admin API, using an app with an approved article-writing scope. Supply the target blog, the required author and title, an HTML body, and `isPublished: false` for your first test. Treat Shopify as a custom route rather than a native connection.

Will images and formatting transfer to a headless CMS automatically?

Not in every case. The integration has to match the destination's body schema and its image handling. Test headings, lists, links, the cover image and inline images in the real preview, and remember that support for one content model does not prove support for every custom rich-text component.

How do I prevent duplicate posts or accidental publishing?

Set the draft state explicitly in the destination, filter for the article state you intend, save the destination record ID for each source article, and test repeat deliveries. Update the existing draft instead of creating a new one, and keep approval and publishing as deliberate steps until the workflow has passed your checks.