Skip to main content

Shopify Integration with SmythOS

Want to automate your e-commerce content and operations? Connect your Shopify store to SmythOS and empower your agents to manage blogs, articles, and more, directly from your workflows.

TL;DR

Securely link your Shopify store to SmythOS using an Admin API access token from a private app. Then, use our suite of components to automate your entire content pipeline, from creating new blog posts to listing articles.

List of Shopify Components

Quickly compare Shopify components by what they do and their key I/O. Click any component name to jump directly to its detailed guide.

ComponentActionWhat it DoesInputsKey OutputsUse Case
Create BlogWriteCreates a new blog within your Shopify store (e.g., "News", "Updates").required store_name, titleidSetting up a new content section on your site.
Get BlogsReadRetrieves a list of all blogs in your Shopify store.required store_nameBlogsFinding the correct blog_id to post an article to.
Create ArticleWriteCreates and publishes a new article within a specified blog.required store_name, blog_id, title, author, body_htmlarticleIdAutomatically publishing a new blog post.
Create Draft ArticleWriteCreates a new article as a draft, hidden from your live site.required store_name, blog_id, title, author, body_htmlarticleIdStaging AI-generated content for human review.
Create Article With ImageWriteCreates a new article and sets its featured image.required store_name, blog_id, title, img_srcarticleIdPublishing visually rich content automatically.
List ArticlesReadRetrieves a list of articles from a specific blog.required store_name, blog_idarticlesGetting recent posts for a "related articles" section.
Get ArticleReadRetrieves the details of a single, specific article.required store_name, blog_id, article_idtitle, body_htmlFetching content for re-purposing or analysis.
INFO
Why Integrate Shopify with Your Agent?

Your Shopify store is more than just products; it's a content platform. Integrating its content management features with SmythOS allows you to build powerful automation pipelines.

  • Automated Content Creation: Create agents that take content from any source—a Google Doc, a Notion page, or an AI model's output—and automatically create and format new blog posts in your Shopify store.
  • Content Syndication: Build a workflow that monitors your primary blog's RSS feed. When a new post is published, an agent can automatically re-publish it to your Shopify blog to drive engagement and SEO.
  • Dynamic Content Updates: Connect your Shopify blog to other data sources. An agent could update an article with real-time information, event details, or related product links automatically.
  • Streamline Your Editorial Process: Use agents to manage your content lifecycle. An agent can create a draft post, notify an editor in Slack for review, and once approved, another agent could potentially update the post to be published.

Prerequisites

Before you begin, please ensure you have the following:

  • An active SmythOS account. (Sign up here).
  • A Shopify account and store.
  • Permissions to create and manage private apps in your Shopify admin panel.
  • Your Shopify Admin API access token.

Getting Started With Shopify

The connection between SmythOS and Shopify is configured using an Admin API access token generated from a private app.

Step 1: Get Your Shopify API Access Token

  1. Log in to your Shopify Admin Panel.
  2. Navigate to Apps from the left-hand menu.
  3. Click on Apps and sales channel settings.
  4. Click Develop apps. If this is your first time, you may need to allow custom app development.
  5. Click Create an app. Give it a name (e.g., "SmythOS Content Agent") and select an App developer.
  6. Once the app is created, go to the API credentials tab. Click Configure Admin API scopes.
  7. Grant the necessary permissions. For content management, you will need at least read_blogs and write_blogs.
  8. Click Save, then click Install app in the top right.
  9. After installing, the Admin API access token will be revealed. Copy this token immediately. It will not be shown again.

Step 2: Store Your Access Token in SmythOS Vault

Your Admin API access token is a sensitive credential. Use the SmythOS Vault to store it securely.

  1. In your SmythOS dashboard, navigate to the Vault.
  2. Create a new secret and paste your Shopify Admin API access token as the value. Give it a memorable name, like shopify_admin_api_token.
  3. For more details, see the Vault Documentation.

Step 3: Configure a Shopify Component

  1. In your SmythOS agent graph, drag and drop any Shopify component.
  2. Click the component to open its Settings panel.
  3. In the Access Token field, select the secret you saved in the Vault (e.g., shopify_admin_api_token).
  4. Your connection is now configured for that component.
Heads-up
You must add the Access Token from the Vault to each Shopify component you use. This ensures all your API calls are properly authenticated.

Which Shopify Component Should I Use?

If you need to…TargetUse this ComponentWhy this one?
Post a new article to your "Company News" blogA blog_id, title, contentCreate ArticleThe standard method for publishing new content to a specific blog on your site.
Save an article for later reviewA blog_id, title, contentCreate Draft ArticleCreates the article but keeps it hidden from your live site until you publish it.
Get the content of a specific blog postA blog_id and article_idGet ArticleThe most direct way to retrieve a single article's full content and metadata.
Find the ID of your "News" blogYour store_nameGet BlogsNecessary first step to find the blog_id you need for creating or listing articles.
Create a new blog section called "Case Studies"Your store_name and a titleCreate BlogUse this to create a new, separate blog (like a category) on your site.

Component Details

This section provides detailed information for each Shopify component.

Get Blogs

Retrieves a list of all blogs in your Shopify store.

INFO
This component requires an Access Token for authentication.

Component-Specific Settings

  • Limit: The maximum number of blogs to retrieve. Default: 50.

Inputs

FieldTypeRequiredNotes
store_namestringYesThe unique name of your Shopify store (e.g., your-store.myshopify.com).

Outputs

FieldTypeDescription
BlogsarrayAn array of blog objects, each containing details like id and title.
ResponseobjectThe full, raw JSON response from the Shopify API.
HeadersobjectThe HTTP headers from the API response.
Use Case

This is an essential first step for content automation. An agent uses this component to get a list of all blogs, finds the ID for the "Company News" blog, and uses that id to create new articles.

Create Blog

Creates a new blog within your Shopify store (e.g., a "News" section or a "Tutorials" section).

INFO
This component requires an Access Token for authentication.

Inputs

FieldTypeRequiredNotes
store_namestringYesThe unique identifier for your Shopify store.
titlestringYesThe title for your new blog.

Outputs

FieldTypeDescription
idintegerThe unique identifier of the newly created blog.
ResponseobjectThe raw JSON response from the API.
HeadersobjectThe HTTP headers from the API response.
Use Case

When launching a new product line, an agent creates a dedicated blog for it called "New Product Line Announcements" to house all related content.

List Articles

Retrieves a list of articles from a specific blog, with powerful filtering options.

INFO
This component requires an Access Token for authentication.

Component-Specific Settings

  • Limit: Max number of articles to retrieve. Default: 50.
  • Published Status: Filter by any, published, or unpublished.

Inputs

FieldTypeRequiredNotes
store_namestringYesYour Shopify store's unique identifier.
blog_idstringYesThe ID of the blog to list articles from.
authorstringOptionalFilter articles by a specific author.
tagstringOptionalFilter articles by a specific tag.
created_at_mindateOptionalShow articles created after this date (ISO 8601 format).

Outputs

FieldTypeDescription
articlesarrayAn array of article objects matching the criteria.
ResponseobjectThe raw JSON response from the API.
HeadersobjectThe HTTP headers from the API response.
Use Case

A "content audit" agent uses this component to retrieve all articles with the published status to check for broken links or outdated information.

Get Article

Retrieves the details of a single, specific article from a blog.

INFO
This component requires an Access Token for authentication.

Inputs

FieldTypeRequiredNotes
store_namestringYesThe unique name of your Shopify store.
blog_idstringYesThe ID of the blog containing the article.
article_idstringYesThe unique ID of the article to retrieve.

Outputs

FieldTypeDescription
titlestringThe title of the retrieved article.
body_htmlstringThe full HTML content of the article.
tagsstringComma-separated tags associated with the article.
userIdintegerThe ID of the author.
ResponseobjectThe raw JSON response from the API.
Use Case

An agent needs to update an existing article. It first uses this component to fetch the current body_html before making modifications.

Create Draft Article

Creates a new article but saves it as a hidden draft, not visible on your live site.

INFO
This component requires an Access Token for authentication.

Inputs

FieldTypeRequiredNotes
store_namestringYesThe unique name of your Shopify store.
blog_idstringYesThe ID of the blog where the draft will be created.
titlestringYesThe title of the draft article.
authorstringYesThe author's name.
tagsstringOptionalA comma-separated list of tags.
body_htmlstringYesThe HTML content of the article.

Outputs

FieldTypeDescription
articleIdintegerThe unique identifier of the newly created draft article.
ResponseobjectThe raw JSON response from the API.
HeadersobjectThe HTTP headers from the API response.
Use Case

An AI agent generates a first draft of a product announcement. It uses this component to save the content to Shopify as a draft, where a human marketer can review, edit, and manually publish it.

Create Article

Creates and immediately publishes a new article to a specified blog.

INFO
This component requires an Access Token for authentication.

Inputs

FieldTypeRequiredNotes
store_namestringYesThe unique identifier for your Shopify store.
blog_idstringYesThe ID of the blog where the article will be posted.
titlestringYesThe title of the article.
authorstringYesThe name of the author creating the article.
tagsstringOptionalA comma-separated list of tags.
body_htmlstringYesThe content of the article in HTML format.

Outputs

FieldTypeDescription
articleIdintegerThe newly assigned unique identifier for the article.
ResponseobjectThe complete raw data from Shopify detailing the newly created article.
HeadersobjectMetadata related to the API response.
Use Case

An agent syndicates content from another platform. Once an article is approved, it uses this component to instantly publish it to the Shopify blog.

Immediate Publication

This action makes the article live on your site as soon as it executes. For a staged approach, use the Create Draft Article component first.

Create Article With Image

Creates and publishes a new article, including a featured image.

INFO
This component requires an Access Token for authentication.

Inputs

FieldTypeRequiredNotes
store_namestringYesThe unique identifier of your Shopify store.
blog_idstringYesThe ID of the blog where the article will be published.
titlestringYesThe title of the article.
authorstringYesThe name of the author.
tagsstringOptionalComma-separated tags for the article.
body_htmlstringYesThe HTML content of the article.
img_srcstringYesThe public source URL for the featured image.
img_altstringOptionalAlternative text for the image for SEO and accessibility.

Outputs

FieldTypeDescription
articleIdintegerThe unique identifier assigned to the newly created article.
ResponseobjectFull raw data returned from Shopify describing the composed article.
HeadersobjectDetails and metadata associated with the API response.
Use Case

An agent generates a blog post and a relevant image with AI. It then calls this component, providing the text and the image URL, to publish a complete, visually rich article in one step.

Public Image URL

The img_src URL must be publicly accessible for Shopify's servers to be able to download and attach it to the post.

Best Practices & Advanced Tips

  • Secure Your Access Token: Your Shopify Admin API access token grants significant permissions to your store. Always store it in the SmythOS Vault.
  • Understand the Hierarchy: To post an article, you first need to know which blog_id to post it to. Use the Get Blogs component to find the correct ID for your "News" or "Updates" blog.
  • Use HTML for Content: The body_html input requires your content to be in HTML format. Your agent should be designed to generate or convert content to HTML before passing it to the component.
  • Manage Scopes: When creating your private app in Shopify, grant only the permissions your agent needs. If it only manages blogs, it doesn't need access to read_orders or write_products.

Troubleshooting Common Issues

  • Error: 401 Unauthorized

    • Cause: The Admin API access token is incorrect, has been uninstalled, or is missing the required scopes.
    • Solution: Verify that the token in your SmythOS Vault is correct. In your Shopify admin panel, ensure the private app is still installed and that you have granted the necessary scopes (e.g., write_blogs).
  • Error: 404 Not Found

    • Cause: The store_name, blog_id, or article_id is incorrect.
    • Solution: Double-check your store name (it should be the your-store.myshopify.com domain). Use Get Blogs and List Articles to verify your IDs are correct.
  • Error: 422 Unprocessable Entity

    • Cause: The request body is malformed. This typically means a required field like title or body_html is missing when creating an article.
    • Solution: Check that all required inputs are provided and correctly formatted. Ensure the body_html contains valid HTML.

What's Next?

You are now ready to build powerful content automations for your Shopify store with the SmythOS Shopify Integration!

Consider these ideas:

  • Build an Agent That...

    • Acts as a content syndication engine. It monitors your primary company blog, and when a new post is published, it automatically creates a corresponding article on your Shopify blog to drive traffic.
    • Generates product-related content. When you add a new product to your store, an agent uses an LLM component to write a "Product Spotlight" article and saves it as a draft for your review.
    • Connects your content and social media. After an agent creates a new article, it takes the article's URL and shares it across your social channels using the Ayrshare Integration.
  • Explore Other Integrations:

    • Use a Webflow or WordPress.org integration to pull content from another CMS and sync it with your Shopify blog.
    • Keep a log of all articles published by your agents in a Google Sheet for content tracking and performance analysis.