Shopify blog SEO publishing through the Admin API

Shopify stores editorial content as articles inside a specific blog. The adapter queries by handle, narrows the result to the configured Blog ID, then creates or updates the native article through the GraphQL Admin API with the reviewed HTML and metadata.

Best for: Commerce brands that want informational or educational SEO content to live beside their storefront on the existing Shopify domain and theme.

Support status: stable
Publisher: shopify

How the connection works

Authentication

A Shopify Admin API access token, shop hostname, Blog ID, and tested API version stored in the server-side publisher.

Server-side variables

  • SEO_BLOG_PUBLISH_TOKEN
  • SEO_BLOG_SITE_SLUG
  • SHOPIFY_ADMIN_TOKEN
  • SHOPIFY_SHOP
  • SHOPIFY_BLOG_ID
  • SHOPIFY_API_VERSION
  • SEO_BLOG_SITE_ORIGIN

Publishing sequence

01

Query articles by handle and confirm the configured parent Blog ID.

02

Build a native article input with HTML body, summary, tags, author, and image.

03

Run articleCreate or articleUpdate based on the exact existing match.

04

Reject GraphQL user errors and retain the storefront-derived canonical URL.

No-write payload and mapping preview

SEO_BLOG_PUBLISH_TOKEN='<tenant-token>' \
SEO_BLOG_SITE_SLUG='<slug>' \
SHOPIFY_ADMIN_TOKEN='<shopify-admin-token>' \
SHOPIFY_SHOP='<shopify-shop>' \
SHOPIFY_BLOG_ID='<shopify-blog-id>' \
SHOPIFY_API_VERSION='<shopify-api-version>' \
SEO_BLOG_SITE_ORIGIN='<origin>' \
npx --yes @wotaso/seo-blog-admin-cli publish-cms --cms shopify --site-slug '<slug>' --site-origin '<origin>' --dry-run

For a currently due approved post, --dry-run builds the destination payload without writing to the provider. It does not contact the provider or prove credentials, remote schema compatibility, deployment, or a live page; when no post is due, provider inputs are not exercised.

Scheduled runner health heartbeat

SEO_BLOG_PUBLISH_TOKEN='<tenant-token>' \
SEO_BLOG_SITE_SLUG='<slug>' \
SHOPIFY_ADMIN_TOKEN='<shopify-admin-token>' \
SHOPIFY_SHOP='<shopify-shop>' \
SHOPIFY_BLOG_ID='<shopify-blog-id>' \
SHOPIFY_API_VERSION='<shopify-api-version>' \
SEO_BLOG_SITE_ORIGIN='<origin>' \
SEO_BLOG_SCHEDULED='true' \
npx --yes @wotaso/seo-blog-admin-cli health --config seo-blog.config.json --mode cms --site-slug '<slug>' --site-origin '<origin>'

Run this from the real scheduled runner after seo-blog.config.json contains the selected connector configuration and the listed secrets are loaded. It reports configuration readiness, not a live article. The dashboard expires readiness at the returned deadline, with a 36-hour fallback when no deadline is available.

Fields and data model

  • Article handle comes from the reviewed slug
  • Tags and author use native Shopify article fields
  • A featured image URL is mapped with descriptive alt text

Canonical and route

The Shopify online store, blog route, theme, sitemap, canonical tags, and storefront deployment remain authoritative. The publisher writes to the selected native blog rather than creating a second hosted article.

Known limits

  • The Admin API token needs article and blog access for the selected shop.
  • Blog IDs are GraphQL global IDs and must match the article destination.
  • Theme layout and commerce-specific components are not changed by the article publisher.

Recovery

  • Dry-run with the production shop hostname and Blog ID before writing.
  • Read GraphQL userErrors before retrying a rejected mutation.
  • Confirm the handle and parent blog when an existing article is not detected.

Integration questions

Where are credentials stored?

The Shopify credentials stay in CI or another server-side secret environment.

Does SEODrafts own the canonical URL?

No. The destination website owns its route, canonical tag, sitemap, rendering, and analytics.

Can the integration be tested before publishing?

Use the no-write payload preview to inspect local mapping, then separately test credentials and the first destination draft before a live run.

Keep the website your team already owns.

Review the opportunity and draft in SEODrafts, then publish approved work through Shopify.

Add my website